mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
24db1bccf4
@ -181,7 +181,7 @@ class CodeEditor(QPlainTextEdit):
|
||||
txt = blk.text()
|
||||
pos = blk.position()
|
||||
curs.setPosition(pos)
|
||||
curs.setPosition(pos+len(txt), QTextCursor.KeepAnchor)
|
||||
curs.setPosition(pos+len(txt), QTextCursor.MoveMode.KeepAnchor)
|
||||
return txt
|
||||
|
||||
# Check if there is a selection. If not then only Shift-Tab is valid
|
||||
@ -213,7 +213,7 @@ class CodeEditor(QPlainTextEdit):
|
||||
end_position += 1
|
||||
# Restore the selection, adjusted for the added or deleted tabs
|
||||
cursor.setPosition(start_position)
|
||||
cursor.setPosition(end_position, QTextCursor.KeepAnchor)
|
||||
cursor.setPosition(end_position, QTextCursor.MoveMode.KeepAnchor)
|
||||
self.setTextCursor(cursor)
|
||||
ev.accept()
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user