Fix unodoableentry for international characters
Gtk has some parameters in bytes, some in characters; they cannot be combined.
This commit is contained in:
parent
c352fa6378
commit
3901e7dd4c
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user