Fix incorrect conversion.
Traceback (most recent call last): File "/usr/bin/diffuse", line 5592, in im_retrieve_surrounding_cb im.set_surrounding(s, len(s), n) TypeError: Must be string, not bytes
This commit is contained in:
parent
b4fd348fb5
commit
9f261cea7b
|
@ -5585,8 +5585,7 @@ class FileDiffViewer(Gtk.Grid):
|
||||||
if self.mode == CHAR_MODE:
|
if self.mode == CHAR_MODE:
|
||||||
# notify input method of text surrounding the cursor
|
# notify input method of text surrounding the cursor
|
||||||
s = nullToEmpty(self.getLineText(self.current_pane, self.current_line))
|
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), self.current_char)
|
||||||
im.set_surrounding(s, len(s), n)
|
|
||||||
|
|
||||||
# callback for 'focus_in_event'
|
# callback for 'focus_in_event'
|
||||||
def focus_in_cb(self, widget, event):
|
def focus_in_cb(self, widget, event):
|
||||||
|
|
Loading…
Reference in New Issue