Fix cursor position changes not scrolling in focus mode

ft.font-size^2
Gonçalo Silva 2019-03-31 03:54:44 +01:00
parent 372d2c8a65
commit c5d2322b96
1 changed files with 5 additions and 1 deletions

View File

@ -196,7 +196,11 @@ class TextView(Gtk.TextView):
def on_mark_set(self, _text_buffer, _location, mark, _data=None):
if mark.get_name() == 'insert':
self.markup.apply(not self.focus_mode)
if self.focus_mode:
self.scroll_to(mark)
self.markup.apply(False)
else:
self.markup.apply(True)
elif mark.get_name() == 'gtk_drag_target':
self.scroll_to(mark)
return True