mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
324622dee5
commit
1e2ec2898f
@ -216,8 +216,8 @@ class Editor(QMainWindow):
|
||||
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…
x
Reference in New Issue
Block a user