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.
This commit is contained in:
Scott Kostyshak 2020-03-11 14:18:33 -04:00
parent 2cfcd706ab
commit adb7283b69

View File

@ -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;