Commit 234a04f8 authored by Lukas Holecek's avatar Lukas Holecek Committed by hjk
Browse files

fakevim: Correct movement mode for yanking lines



Change-Id: I936574d9220d11031e1f68600bec6e33c88808a5
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent baa4db24
...@@ -1349,6 +1349,11 @@ void FakeVimPlugin::test_vim_copy_paste() ...@@ -1349,6 +1349,11 @@ void FakeVimPlugin::test_vim_copy_paste()
KEYS("yj", "ab" X "c" N "def"); KEYS("yj", "ab" X "c" N "def");
data.setText("abc" N "de" X "f"); data.setText("abc" N "de" X "f");
KEYS("yk", "ab" X "c" N "def"); KEYS("yk", "ab" X "c" N "def");
// copy empty line
data.setText(X "a" N "" N "b");
KEYS("Vjy", X "a" N "" N "b");
KEYS("p", "a" N X "a" N "" N "" N "b");
} }
void FakeVimPlugin::test_vim_undo_redo() void FakeVimPlugin::test_vim_undo_redo()
......
...@@ -3692,6 +3692,7 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input) ...@@ -3692,6 +3692,7 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input)
|| (input.is('Y') && isVisualLineMode()) || (input.is('Y') && isVisualLineMode())
|| (input.is('Y') && isVisualCharMode())) { || (input.is('Y') && isVisualCharMode())) {
m_rangemode = RangeLineMode; m_rangemode = RangeLineMode;
m_movetype = MoveLineWise;
m_submode = YankSubMode; m_submode = YankSubMode;
finishMovement(); finishMovement();
} else if ((input.is('y') || input.is('Y')) && isVisualBlockMode()) { } else if ((input.is('y') || input.is('Y')) && isVisualBlockMode()) {
......
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