[LyX/master] outline-up/down: preserve cursor's position
Scott Kostyshak
skostysh at lyx.org
Wed Mar 11 18:14:42 UTC 2020
commit adb7283b69f5dddfabb8d807a432cd1e5e60b221
Author: Scott Kostyshak <skostysh at lyx.org>
Date: Wed Mar 11 14:18:33 2020 -0400
outline-up/down: preserve cursor's position
There is no need to change the cursor's position to the beginning of
the line.
This change does not affect the behavior of using the buttons in the
Outliner pane, but is useful for using the keyboard shortcuts.
---
src/Text3.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Text3.cpp b/src/Text3.cpp
index 81b0132..4a47556 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -2765,14 +2765,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_OUTLINE_UP:
outline(OutlineUp, cur, this);
- setCursor(cur, cur.pit(), 0);
+ setCursor(cur, cur.pit(), cur.pos());
cur.forceBufferUpdate();
needsUpdate = true;
break;
case LFUN_OUTLINE_DOWN:
outline(OutlineDown, cur, this);
- setCursor(cur, cur.pit(), 0);
+ setCursor(cur, cur.pit(), cur.pos());
cur.forceBufferUpdate();
needsUpdate = true;
break;
More information about the lyx-cvs
mailing list