summaryrefslogtreecommitdiff
path: root/src/terminal_ui.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-11-30 22:47:18 +1100
committerMaxime Coste <mawww@kakoune.org>2021-07-12 10:25:58 +1000
commit07750656a86e033f242204f4158c813ae943478d (patch)
tree5544cbb04a11f642208e6448e7625f1828317f4c /src/terminal_ui.hh
parent03563d51aa76dfeb7c1709d1c41fdbaf2af5e818 (diff)
Blit all window together before outputing them to the tty
This should reduce flicker, by avoiding transient states where info/menu windows are not displayed, and paves the way for proper diffing of the screen.
Diffstat (limited to 'src/terminal_ui.hh')
-rw-r--r--src/terminal_ui.hh14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/terminal_ui.hh b/src/terminal_ui.hh
index bf332ba4..45664a4a 100644
--- a/src/terminal_ui.hh
+++ b/src/terminal_ui.hh
@@ -77,24 +77,20 @@ private:
{
void create(const DisplayCoord& pos, const DisplayCoord& size);
void destroy();
- void refresh(bool force);
+ void blit(Window& target);
+ void output();
void move_cursor(DisplayCoord coord);
void draw(ConstArrayView<DisplayAtom> atoms, const Face& default_face);
explicit operator bool() const { return not lines.empty(); }
- struct Atom
- {
- String text;
- Face face;
- };
- Vector<Vector<Atom>> lines;
+ struct Line;
+ Vector<Line> lines;
DisplayCoord cursor;
-
- void clear_line();
};
Window m_window;
+ Window m_screen;
DisplayCoord m_dimensions;
termios m_original_termios{};