]> git.lyx.org Git - features.git/commit
#6401 correct cursor movement for word forward/backward with enabled Mac style (mac_l...
authorStephan Witt <switt@lyx.org>
Sat, 12 Sep 2020 12:34:56 +0000 (14:34 +0200)
committerStephan Witt <switt@lyx.org>
Sat, 12 Sep 2020 12:34:56 +0000 (14:34 +0200)
commit320b6b66566978fb9c75de086b889f0d34c5cf87
tree1275688b49f30ff5fc7e50b4ef24fce87ca4bea5
parentb4f3963ab2ba0baecfda9d043eda02569ba7c21f
#6401 correct cursor movement for word forward/backward with enabled Mac style (mac_like_cursor_movement)

The change includes a rewrite of the cursor movement when „mac style“ is enabled and don’t change anything otherwise.
The new code for mac uses the document iterator to go forward or backward. The traversal stops at word boundaries.
If going forward the position increments until a word is reached (if not already inside) and stops at the end of the word.
If going backward it does the same in opposite direction. The cursor jumps over non-editable insets and math.
Editable (open) insets are entered and the cursor move detects word boundaries inside them.
src/Text.cpp