mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 08:43:10 +02:00
...
This commit is contained in:
parent
324622dee5
commit
1e2ec2898f
1 changed files with 2 additions and 2 deletions
|
|
@ -216,8 +216,8 @@ def _cursor_position_changed(self, *args):
|
|||
def cursor_position(self):
|
||||
c = self.editor.textCursor()
|
||||
char = ''
|
||||
if not c.atEnd():
|
||||
c.setPosition(c.position()+1, c.KeepAnchor)
|
||||
if not c.atStart():
|
||||
c.setPosition(c.position()-1, c.KeepAnchor)
|
||||
char = unicode(c.selectedText())
|
||||
return (c.blockNumber() + 1, c.positionInBlock(), char)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue