From: Scott Kostyshak Date: Wed, 11 Mar 2020 18:18:33 +0000 (-0400) Subject: outline-up/down: preserve cursor's position X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1133 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=adb7283b69f5dddfabb8d807a432cd1e5e60b221;p=lyx.git 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. --- diff --git a/src/Text3.cpp b/src/Text3.cpp index 81b01324ad..4a4755637a 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;