Created
April 13, 2019 11:13
-
-
Save jaap-karssenberg/5f99835413aa5aa2d995396ae6d77363 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/zim/gui/pageview.py b/zim/gui/pageview.py | |
index be935f46..da27803c 100644 | |
--- a/zim/gui/pageview.py | |
+++ b/zim/gui/pageview.py | |
@@ -2102,7 +2102,6 @@ class TextBuffer(Gtk.TextBuffer): | |
# | |
# Note that 'start' and 'end' refer to the same postion here ... | |
- offset = start.get_offset() | |
if ( | |
( | |
not start.starts_line() | |
@@ -2113,8 +2112,6 @@ class TextBuffer(Gtk.TextBuffer): | |
) | |
): | |
self._do_lines_merged(start) | |
- start = self.get_iter_at_offset(offset) | |
- end = None | |
bullet = self._get_bullet_at_iter(start) | |
if bullet is not None: | |
@@ -2122,9 +2119,13 @@ class TextBuffer(Gtk.TextBuffer): | |
self._check_renumber.append(start.get_line()) | |
else: | |
# Clean up the redundant bullet | |
+ offset = start.get_offset() | |
bound = start.copy() | |
self._iter_forward_past_bullet(bound, bullet) | |
self.delete(start, bound) | |
+ new = self.get_iter_at_offset(offset) | |
+ start.assign(new) | |
+ end.assign(new) | |
elif start.starts_line(): | |
indent_tags = list(filter(_is_indent_tag, start.get_tags())) | |
if indent_tags and indent_tags[0].zim_attrib['_bullet']: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment