Fix unodoableentry for international characters

Gtk has some parameters in bytes, some in characters; they cannot
be combined.
This commit is contained in:
prculley 2017-02-26 09:11:31 -06:00 committed by Nick Hall
parent c352fa6378
commit 3901e7dd4c

View File

@ -177,8 +177,8 @@ class UndoableEntry(Gtk.Entry, Gtk.Editable):
self.undo_stack.append(prev_insert) self.undo_stack.append(prev_insert)
self.undo_stack.append(undo_action) self.undo_stack.append(undo_action)
break break
self.get_buffer().insert_text(position, text, length) self.get_buffer().insert_text(position, text, len(text))
return position + length return position + len(text)
def _on_delete_text(self, editable, start, end): def _on_delete_text(self, editable, start, end):
def can_be_merged(prev, cur): def can_be_merged(prev, cur):