forked from qt-creator/qt-creator
FakeVim: Fixes for visual delete with end of line selected
Change-Id: I486aff7cf6a81b125a9b3b179505656efe997789 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user