1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-09 09:34:06 +02:00

Allow mouse click to move cursor to end-of-line while in Insert or Replace modes

This commit is contained in:
rmaddy 2003-04-21 18:15:37 +00:00
parent 9f8e0ad27a
commit 2c6a6ef06f

View File

@ -141,7 +141,9 @@ public class MotionGroup extends AbstractActionGroup
{
case 0:
int offset = editor.getCaretModel().getOffset();
int clean = EditorHelper.normalizeOffset(editor, offset, false);
int clean = EditorHelper.normalizeOffset(editor, offset,
CommandState.getInstance().getMode() == CommandState.MODE_INSERT ||
CommandState.getInstance().getMode() == CommandState.MODE_REPLACE);
if (offset != clean)
{
editor.getCaretModel().moveToOffset(clean);