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

FakeVim: Fix usage of copy/paste registers with tests



Change-Id: I9b860a40a9b18286a25e1d919dab1c21ea5def10
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent ead8c19d
......@@ -1499,6 +1499,14 @@ void FakeVimPlugin::test_vim_copy_paste()
data.setText(X "a" N "" N "b");
KEYS("Vjy", X "a" N "" N "b");
KEYS("p", "a" N X "a" N "" N "" N "b");
// registers
data.setText(X "abc" N "def" N "ghi");
KEYS("\"xyy", X "abc" N "def" N "ghi");
KEYS("\"xp", "abc" N X "abc" N "def" N "ghi");
KEYS("j\"yyy", "abc" N "abc" N X "def" N "ghi");
KEYS("gg\"yP", X "def" N "abc" N "abc" N "def" N "ghi");
KEYS("\"xP", X "abc" N "def" N "abc" N "abc" N "def" N "ghi");
}
void FakeVimPlugin::test_vim_undo_redo()
......
......@@ -4008,7 +4008,7 @@ bool FakeVimHandler::Private::handleYankSubMode(const Input &input)
m_movetype = MoveLineWise;
int endPos = firstPositionInLine(lineForPosition(position()) + count() - 1);
Range range(position(), endPos, RangeLineMode);
yankText(range);
yankText(range, m_register);
m_submode = NoSubMode;
handled = true;
} else {
......
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