mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle case when col number moves cursor more than one line past the originating line
This commit is contained in:
parent
f383456f52
commit
d28c4b5358
@ -198,7 +198,8 @@ class TextEdit(QPlainTextEdit):
|
|||||||
else:
|
else:
|
||||||
c.setPosition(c.block().position() + col)
|
c.setPosition(c.block().position() + col)
|
||||||
if c.blockNumber() + 1 > lnum:
|
if c.blockNumber() + 1 > lnum:
|
||||||
c.movePosition(c.PreviousBlock)
|
# We have moved past the end of the line
|
||||||
|
c.setPosition(c.block().position())
|
||||||
c.movePosition(c.EndOfBlock)
|
c.movePosition(c.EndOfBlock)
|
||||||
self.setTextCursor(c)
|
self.setTextCursor(c)
|
||||||
self.ensureCursorVisible()
|
self.ensureCursorVisible()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user