This commit is contained in:
Kovid Goyal 2013-12-22 19:18:24 +05:30
parent 1e2ec2898f
commit ecbe9963ab

View file

@ -217,6 +217,7 @@ def cursor_position(self):
c = self.editor.textCursor()
char = ''
if not c.atStart():
c.clearSelection()
c.setPosition(c.position()-1, c.KeepAnchor)
char = unicode(c.selectedText())
return (c.blockNumber() + 1, c.positionInBlock(), char)