summaryrefslogtreecommitdiff
path: root/desktop/inc/lib/init.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/inc/lib/init.hxx')
-rw-r--r--desktop/inc/lib/init.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index df065d767dca..7cf81e33b629 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -39,6 +39,8 @@ namespace desktop {
// Add the states that are safe to skip duplicates on,
// even when not consequent.
+ m_states.emplace(LOK_CALLBACK_TEXT_SELECTION_START, "NIL");
+ m_states.emplace(LOK_CALLBACK_TEXT_SELECTION_END, "NIL");
m_states.emplace(LOK_CALLBACK_TEXT_SELECTION, "NIL");
m_states.emplace(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, "NIL");
m_states.emplace(LOK_CALLBACK_STATE_CHANGED, "NIL");
@@ -94,6 +96,13 @@ namespace desktop {
return;
}
+ if (type == LOK_CALLBACK_TEXT_SELECTION && payload.empty())
+ {
+ // Removing text selection invalidates the start and end as well.
+ m_states[LOK_CALLBACK_TEXT_SELECTION_START] = "";
+ m_states[LOK_CALLBACK_TEXT_SELECTION_END] = "";
+ }
+
m_queue.emplace_back(type, payload);
lock.unlock();