Philipp Hörist pushed to branch master at gajim / gajim
Commits: 4113f9e7 by wurstsalat at 2022-08-15T19:34:55+00:00 fix: MessageInputTextView: Account for having multiple blocks when applying style Fixes #11015 - - - - - 1 changed file: - gajim/gtk/message_input.py Changes: ===================================== gajim/gtk/message_input.py ===================================== @@ -175,8 +175,10 @@ def _on_text_changed(self, buf: Gtk.TextBuffer) -> None: for block in result.blocks: if isinstance(block, PlainBlock): for span in block.spans: - start_iter = buf.get_iter_at_offset(span.start) - end_iter = buf.get_iter_at_offset(span.end) + start_iter = buf.get_iter_at_offset( + span.start + block.start) + end_iter = buf.get_iter_at_offset( + span.end + block.start) buf.apply_tag_by_name(span.name, start_iter, end_iter) def insert_text(self, text: str) -> None: View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4113f9e71a19a687a6abd5388c106354b3bb8108 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4113f9e71a19a687a6abd5388c106354b3bb8108 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits