mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
* Text.cpp (cursorForwardOneWord, cursorBackwardOneWord): fix
moving in mac-like mode (a space is not a char) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@25515 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1414b1ad87
commit
a12ced96f5
@ -829,7 +829,7 @@ bool Text::cursorRightOneWord(Cursor & cur)
|
||||
|
||||
if (lyxrc.mac_like_word_movement) {
|
||||
// Skip through trailing punctuation and spaces.
|
||||
while (pos != lastpos && par.isChar(pos))
|
||||
while (pos != lastpos && (par.isChar(pos) || par.isSpace(pos)))
|
||||
++pos;
|
||||
|
||||
// Skip over either a non-char inset or a full word
|
||||
@ -870,8 +870,8 @@ bool Text::cursorLeftOneWord(Cursor & cur)
|
||||
return setCursor(cur, pit - 1, getPar(pit - 1).size());
|
||||
|
||||
if (lyxrc.mac_like_word_movement) {
|
||||
// Skip through puctuation and spaces.
|
||||
while (pos != 0 && par.isChar(pos - 1))
|
||||
// Skip through punctuation and spaces.
|
||||
while (pos != 0 && (par.isChar(pos - 1) || par.isSpace(pos - 1)))
|
||||
--pos;
|
||||
|
||||
// Skip over either a non-char inset or a full word
|
||||
|
Loading…
Reference in New Issue
Block a user