mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix a regression that caused the Home key to not move to the start of the line on lines containing un-indented tags
This commit is contained in:
parent
3d0859432e
commit
46c6f3a01e
@ -55,7 +55,7 @@ def smart_home(editor, ev):
|
||||
cursor = editor.textCursor()
|
||||
mode = cursor.KeepAnchor if test_modifiers(ev, Qt.ShiftModifier) else cursor.MoveAnchor
|
||||
cursor.movePosition(cursor.StartOfBlock, mode)
|
||||
if text.strip():
|
||||
if text.strip() and text.lstrip() != text:
|
||||
# Move to the start of text
|
||||
cursor.movePosition(cursor.NextWord, mode)
|
||||
editor.setTextCursor(cursor)
|
||||
|
Loading…
x
Reference in New Issue
Block a user