fakevim: Merge marks on undo so new marks are not lost

Overwriting a mark with new position and undoing restores the previous
state of the mark.

Creating new mark (not overwriting old value) on a position and undoing
won't remove the mark.

Change-Id: I673874ef9df0aae16f86efe8599a43a77aae19ee
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Lukas Holecek
2012-11-24 08:42:06 +01:00
committed by hjk
parent 9ed83d4e2b
commit ece5a4a33b
2 changed files with 26 additions and 1 deletions

View File

@@ -1151,6 +1151,19 @@ void FakeVimPlugin::test_vim_marks()
KEYS("''", " " "abc" N " " X "def" N " " "ghi");
KEYS("`'", X " " "abc" N " " "def" N " " "ghi");
KEYS("`'", " " "abc" N " " X "def" N " " "ghi");
// new mark isn't lost on undo
data.setText( "abc" N "d" X "ef" N "ghi");
KEYS("x" "mx" "gg", X "abc" N "df" N "ghi");
KEYS("ugg" "`x", "abc" N "d" X "ef" N "ghi");
// previous value of mark is restored on undo/redo
data.setText( "abc" N "d" X "ef" N "ghi");
KEYS("mx" "x" "ggl", "a" X "bc" N "df" N "ghi");
KEYS("mx" "uG" "`x", "abc" N "d" X "ef" N "ghi");
KEYS("<c-r>G" "`x", "a" X "bc" N "df" N "ghi");
KEYS("uG" "`x", "abc" N "d" X "ef" N "ghi");
KEYS("<c-r>G" "`x", "a" X "bc" N "df" N "ghi");
}
void FakeVimPlugin::test_vim_jumps()