This commit is contained in:
Kovid Goyal 2014-11-24 08:44:51 +05:30
parent cec29eb6d8
commit c9b2cdfd67

View File

@ -85,6 +85,7 @@ class Smarts(NullSmarts):
elif key == Qt.Key_Home and no_modifiers(ev, Qt.ControlModifier) and not is_cursor_on_wrapped_line(editor): elif key == Qt.Key_Home and no_modifiers(ev, Qt.ControlModifier) and not is_cursor_on_wrapped_line(editor):
cursor, text = get_text_before_cursor(editor) cursor, text = get_text_before_cursor(editor)
cursor = editor.textCursor()
mode = cursor.KeepAnchor if test_modifiers(ev, Qt.ShiftModifier) else cursor.MoveAnchor mode = cursor.KeepAnchor if test_modifiers(ev, Qt.ShiftModifier) else cursor.MoveAnchor
cursor.movePosition(cursor.StartOfBlock, mode) cursor.movePosition(cursor.StartOfBlock, mode)
if text.strip(): if text.strip():