Commit 6868fedf authored by Lukas Holecek's avatar Lukas Holecek Committed by hjk

fakevim: Yank with up/down movement ends in same column

Yank followed by vertical movement ends in same column as at the
beginning of the command (or at the end of line if line ha less
columns).

Change-Id: I573a8435ba9b76430fa3778e536726882f4c6ce1
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent ece5a4a3
......@@ -1239,6 +1239,10 @@ void FakeVimPlugin::test_vim_copy_paste()
KEYS("Vjy", X "abc" N "def");
data.setText("ab" X "c" N "def");
KEYS("<c-v>jhhy", X "abc" N "def");
data.setText("ab" X "c" N "def");
KEYS("yj", "ab" X "c" N "def");
data.setText("abc" N "de" X "f");
KEYS("yk", "ab" X "c" N "def");
}
void FakeVimPlugin::test_vim_undo_redo()
......
......@@ -2620,8 +2620,12 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommandMovement)
setPosition(qMin(pos1, pos2) + col);
} else {
setPosition(qMin(position(), anchor()));
if (m_rangemode == RangeLineMode)
moveToStartOfLine();
if (m_rangemode == RangeLineMode) {
if (isVisualMode())
moveToStartOfLine();
else
setTargetColumn();
}
}
leaveVisualMode();
} else if (m_submode == InvertCaseSubMode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment