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

FakeVim: First <Delete> is part of dot command in insert mode



Change-Id: I9324c65333c0f893541043e953456e83a9986bf7
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent af559bf8
......@@ -536,6 +536,14 @@ void FakeVimPlugin::test_vim_insert()
KEYS("2iX<delete>Y<esc>", "XYX" X "Yc" N "def");
KEYS("0j.", "XYXYc" N "XYX" X "Yf");
data.setText("abc" N "def");
KEYS("i<delete>XY", "XY" X "bc" N "def");
KEYS("0j.", "XYbc" N "X" X "Yef");
data.setText("ab" X "c" N "def");
KEYS("i<bs>XY", "aXY" X "c" N "def");
KEYS("j.", "aXYc" N "dX" X "Yf");
// insert in visual block mode
data.setText("abc" N "d" X "ef" N "jkl" N "mno" N "pqr");
KEYS("<c-v>2j" "2I" "XYZ<esc>", "abc" N "d" X "XYZXYZef" N "jXYZXYZkl" N "mXYZXYZno" N "pqr");
......
......@@ -4253,9 +4253,10 @@ EventResult FakeVimHandler::Private::handleInsertMode(const Input &input)
insert = _("<BS>");
endEditBlock();
} else if (input.isKey(Key_Delete)) {
setAnchor();
joinPreviousEditBlock();
cursor().deleteChar();
insert = _("<DELETE>");
endEditBlock();
} else if (input.isKey(Key_PageDown) || input.isControl('f')) {
removeAutomaticIndentation();
moveDown(count() * (linesOnScreen() - 2));
......
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