fakevim: Correct visual selection of a quoted object

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

View File

@@ -876,11 +876,26 @@ void FakeVimPlugin::test_vim_block_selection()
KEYS("u", "(abc()" X "())");
KEYS("<c-r>", "(abc()" X ")");
data.setText("\"abc" X "\"\"def\"");
KEYS("vi\"d", "\"" X "\"\"def\"");
// repeat change inner
data.setText("(abc)" N "def" N "(ghi)");
KEYS("ci(xyz<esc>", "(xy" X "z)" N "def" N "(ghi)");
KEYS("j.", "(xyz)" N "de" X "f" N "(ghi)");
KEYS("j.", "(xyz)" N "def" N "(xy" X "z)");
// quoted string
data.setText("\"abc" X "\"\"def\"");
KEYS("di\"", "\"" X "\"\"def\"");
KEYS("u", "\"" X "abc\"\"def\"");
KEYS("<c-r>", "\"" X "\"\"def\"");
NOT_IMPLEMENTED
// quoted string with escaped character
data.setText("\"abc\"");
KEYS("di\"", "\"abc\"\"" X "\"");
KEYS("u", "\"abc\"\"" X "def\"");
}
void FakeVimPlugin::test_vim_repeat()

View File

@@ -6868,6 +6868,9 @@ bool FakeVimHandler::Private::selectQuotedStringTextObject(bool inner,
p2 -= sz - 1;
}
if (isVisualMode())
--p2;
setAnchorAndPosition(p1, p2);
m_movetype = MoveExclusive;