fakevim: Escape insert command and correct undo position for "I"

Escape inserted string for repeatition, e.g. command "2i<up>" will
insert text "<up><up>".

Undo position for "I" is start of selection or line.

Change-Id: Ic7e6d8dbf712197b36be20b17ef6d1c0814b1a51
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Lukas Holecek
2012-12-20 18:29:20 +01:00
committed by hjk
parent b9511fe1e9
commit 9a774254bf
2 changed files with 12 additions and 1 deletions

View File

@@ -548,6 +548,16 @@ void FakeVimPlugin::test_vim_insert()
data.setText("abc" N "de" X "f" N "" N "jkl" N "mno");
KEYS("<c-v>2jh" "2I" "XYZ<esc>", "abc" N "d" X "XYZXYZef" N "" N "jXYZXYZkl" N "mno");
INTEGRITY(false);
// repeat insert with special characters
data.setText("ab" X "c" N "def");
KEYS("2i<lt>down><esc>", "ab<down><down" X ">c" N "def");
INTEGRITY(false);
data.setText(" ab" X "c" N " def");
KEYS("2I<lt>end><esc>", " <end><end" X ">abc" N " def");
KEYS("u", " " X "abc" N " def");
KEYS(".", " <end><end" X ">abc" N " def");
}
void FakeVimPlugin::test_vim_fFtT()