From 555cdbb7b75d0c972d2a26210aa3edbce3a206b2 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Wed, 11 Mar 2020 14:18:33 -0400 Subject: [PATCH] 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 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5