Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
0611f8d6 by wurstsalat at 2023-11-03T22:07:21+01:00
fix: Emojis: Improve detection of shortcode start

Fixes #11594

- - - - -


1 changed file:

- gajim/gtk/chat_action_processor.py


Changes:

=====================================
gajim/gtk/chat_action_processor.py
=====================================
@@ -233,9 +233,11 @@ def _check_for_emoji(self, start_iter: Gtk.TextIter) -> 
bool:
 
             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



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0611f8d683560d9fad8877a1ca4f7208c39d88d2

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0611f8d683560d9fad8877a1ca4f7208c39d88d2
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to