Merge pull request #37 from likema/fix-bytes-type

Fix incorrect conversion.
This commit is contained in:
Creak 2020-05-07 15:47:41 -04:00 committed by GitHub
commit b60785ee76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -5585,8 +5585,7 @@ class FileDiffViewer(Gtk.Grid):
if self.mode == CHAR_MODE:
# notify input method of text surrounding the cursor
s = nullToEmpty(self.getLineText(self.current_pane, self.current_line))
s, n = codecs.encode(s, 'utf_8'), len(codecs.encode(s[:self.current_char], 'utf_8'))
im.set_surrounding(s, len(s), n)
im.set_surrounding(s, len(s), self.current_char)
# callback for 'focus_in_event'
def focus_in_cb(self, widget, event):