diff options
author | wurstsalat <mailtrash@posteo.de> | 2023-11-04 00:07:18 +0300 |
---|---|---|
committer | wurstsalat <mailtrash@posteo.de> | 2023-11-04 00:07:21 +0300 |
commit | 0611f8d683560d9fad8877a1ca4f7208c39d88d2 (patch) | |
tree | a620d2b13ef9c364fd4a40c44708bb462ff36830 | |
parent | 52033455efe1277ead65d0f3403ba5b10ecce1e2 (diff) |
fix: Emojis: Improve detection of shortcode start
Fixes #11594
-rw-r--r-- | gajim/gtk/chat_action_processor.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gajim/gtk/chat_action_processor.py b/gajim/gtk/chat_action_processor.py index 347d08fdb..f6fd4c949 100644 --- a/gajim/gtk/chat_action_processor.py +++ b/gajim/gtk/chat_action_processor.py @@ -233,9 +233,11 @@ class ChatActionProcessor(Gtk.Popover): action_text = self._buf.get_text( start, self._current_iter, False)[1:] - if self._start_mark is None: - self._start_mark = Gtk.TextMark.new('chat-action-start', True) - self._buf.add_mark(self._start_mark, start) + if self._start_mark is not None: + self._buf.delete_mark(self._start_mark) + + self._start_mark = Gtk.TextMark.new('chat-action-start', True) + self._buf.add_mark(self._start_mark, start) if self._active or len(action_text) > 1: # Don't activate until a sufficient # of chars has been typed, # which is chosen to be > 1 to not interfere with ASCII smilies |