Commit f9457cb4 authored by Martin v. Löwis's avatar Martin v. Löwis

Always convert Text.index result to string.

This improves compatibility with Tcl 8.5, which would
otherwise return textindex objects.
parent eec61f08
......@@ -2981,7 +2981,7 @@ class Text(Widget):
return self.tk.call(self._w, "image", "names")
def index(self, index):
"""Return the index in the form line.char for INDEX."""
return self.tk.call(self._w, 'index', index)
return str(self.tk.call(self._w, 'index', index))
def insert(self, index, chars, *args):
"""Insert CHARS before the characters at INDEX. An additional
tag can be given in ARGS. Additional CHARS and tags can follow in ARGS."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment