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

FakeVim: Fixes for visual delete with end of line selected



Change-Id: I486aff7cf6a81b125a9b3b179505656efe997789
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 0db85db3
......@@ -2790,12 +2790,11 @@ void FakeVimPlugin::test_vim_visual_d()
KEYS("u", lmid(0, 1)+"\n" + "|" + lmid(1));
KEYS("v$d", lmid(0, 1)+"\n" + "|" + lmid(2));
NOT_IMPLEMENTED
KEYS("v$od", lmid(0, 1)+"\n" + "|" + lmid(3));
KEYS("$v$x", lmid(0, 1)+"\n" + lmid(3,1) + "|" + lmid(4));
KEYS("0v$d", lmid(0, 1)+"\n" + "|" + lmid(5));
KEYS("$v0d", lmid(0, 1)+"\n" + "|\n" + lmid(6));
KEYS("v$o0k$d", lmid(0, 1)+"\n" + "|" + lmid(6).mid(1));
KEYS("v$o0k$d", "|" + lmid(6));
}
void FakeVimPlugin::test_vim_Visual_d()
......
......@@ -2659,7 +2659,7 @@ void FakeVimHandler::Private::fixSelection()
}
m_movetype = MoveLineWise;
}
} else {
} else if (!m_anchorPastEnd) {
setAnchorAndPosition(anchor() + 1, position());
}
}
......@@ -3426,7 +3426,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
updateMiniBuffer();
m_positionPastEnd = (m_visualTargetColumn == -1) && isVisualMode();
m_positionPastEnd = (m_visualTargetColumn == -1) && isVisualMode() && !atEmptyLine();
return handled ? EventHandled : EventCancelled;
}
......
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