summaryrefslogtreecommitdiff
path: root/src/client.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-08-12 17:10:12 +1000
committerMaxime Coste <mawww@kakoune.org>2024-08-12 17:10:12 +1000
commita250b96c18659d34d50e13de8d5126ca7fed6814 (patch)
treebe08cbd44915d60d39a34389cadda04b1bfd66b5 /src/client.hh
parent6af7a847c74a05748ba139aed6386c0a6df0220b (diff)
Move most info/status clear logic to client
This makes it possible to remove the pending clears whenever an info/status line is explicitely added, removing a class of race conditions introduced by the previous implementation.
Diffstat (limited to 'src/client.hh')
-rw-r--r--src/client.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client.hh b/src/client.hh
index 26486f8f..64262f91 100644
--- a/src/client.hh
+++ b/src/client.hh
@@ -56,6 +56,9 @@ public:
DisplayCoord dimensions() const;
+ void schedule_clear();
+ void clear_pending();
+
void force_redraw(bool full = false);
void redraw_ifn();
@@ -111,6 +114,16 @@ private:
};
int m_ui_pending = 0;
+ enum class PendingClear
+ {
+ None = 0,
+ Info = 0b01,
+ StatusLine = 0b10
+ };
+ friend constexpr bool with_bit_ops(Meta::Type<PendingClear>) { return true; }
+ PendingClear m_pending_clear = PendingClear::None;
+
+
struct Menu
{
Vector<DisplayLine> items;