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

fakevim: Correct visual selection of a text object

Change-Id: Ib4996a88d1bbbec25ab864a37f62825e5b0a2b27
Reviewed-by: default avatarhjk <>
parent d1abb3e3
......@@ -843,6 +843,15 @@ void FakeVimPlugin::test_vim_block_selection()
KEYS("di\"", "\"" X "\"");
// visual selection
data.setText("(abc()" X "(def))");
KEYS("vi(d", "(abc()(" X "))");
KEYS("u", "(abc()(" X "def))");
KEYS("<c-r>", "(abc()(" X "))");
KEYS("va(d", "(abc()" X ")");
KEYS("u", "(abc()" X "())");
KEYS("<c-r>", "(abc()" X ")");
// repeat change inner
data.setText("(abc)" N "def" N "(ghi)");
KEYS("ci(xyz<esc>", "(xy" X "z)" N "def" N "(ghi)");
......@@ -6768,6 +6768,9 @@ bool FakeVimHandler::Private::selectBlockTextObject(bool inner,
p2 -= sright.size() - 2;
if (isVisualMode())
setAnchorAndPosition(p1, p2);
m_movetype = MoveExclusive;
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