From 83e1b731a8780fecf9366032e08d4430a80c61ee Mon Sep 17 00:00:00 2001 From: Shaun Patterson Date: Mon, 7 Sep 2020 16:03:56 -0400 Subject: [PATCH] VIM-1756: startSel works in insert mode --- resources/META-INF/includes/VimActions.xml | 12 ++++++------ .../motion/scroll/MotionScrollPageDownAction.kt | 4 +--- .../action/motion/scroll/MotionScrollPageUpAction.kt | 4 +--- .../vim/action/motion/text/MotionWordLeftAction.kt | 4 +--- .../vim/action/motion/text/MotionWordRightAction.kt | 4 +--- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/resources/META-INF/includes/VimActions.xml b/resources/META-INF/includes/VimActions.xml index b193bcd501..2d121b363c 100644 --- a/resources/META-INF/includes/VimActions.xml +++ b/resources/META-INF/includes/VimActions.xml @@ -28,9 +28,9 @@ - + - + @@ -152,10 +152,10 @@ - - - - + + + + diff --git a/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageDownAction.kt b/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageDownAction.kt index 6238d7f3da..4976de85b6 100644 --- a/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageDownAction.kt +++ b/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageDownAction.kt @@ -47,9 +47,7 @@ class MotionScrollPageDownAction : VimActionHandler.SingleExecution() { class MotionScrollPageDownInsertModeAction : VimActionHandler.SingleExecution(), ComplicatedKeysAction { override val keyStrokesSet: Set> = setOf( - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.SHIFT_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, KeyEvent.SHIFT_DOWN_MASK)) + listOf(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0)) ) override val type: Command.Type = Command.Type.OTHER_READONLY diff --git a/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageUpAction.kt b/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageUpAction.kt index d899a9fb7a..c2f32eab70 100644 --- a/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageUpAction.kt +++ b/src/com/maddyhome/idea/vim/action/motion/scroll/MotionScrollPageUpAction.kt @@ -47,9 +47,7 @@ class MotionScrollPageUpAction : VimActionHandler.SingleExecution() { class MotionScrollPageUpInsertModeAction : VimActionHandler.SingleExecution(), ComplicatedKeysAction { override val keyStrokesSet: Set> = setOf( - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.SHIFT_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_UP, KeyEvent.SHIFT_DOWN_MASK)) + listOf(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0)) ) override val type: Command.Type = Command.Type.OTHER_READONLY diff --git a/src/com/maddyhome/idea/vim/action/motion/text/MotionWordLeftAction.kt b/src/com/maddyhome/idea/vim/action/motion/text/MotionWordLeftAction.kt index 36177e3536..06cf3139c8 100644 --- a/src/com/maddyhome/idea/vim/action/motion/text/MotionWordLeftAction.kt +++ b/src/com/maddyhome/idea/vim/action/motion/text/MotionWordLeftAction.kt @@ -51,9 +51,7 @@ class MotionWordLeftInsertAction : MotionActionHandler.ForEachCaret(), Complicat override val keyStrokesSet: Set> = setOf( listOf(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.CTRL_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, KeyEvent.CTRL_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, KeyEvent.SHIFT_DOWN_MASK)) + listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, KeyEvent.CTRL_DOWN_MASK)) ) override val flags: EnumSet = enumSetOf(CommandFlags.FLAG_SAVE_STROKE) diff --git a/src/com/maddyhome/idea/vim/action/motion/text/MotionWordRightAction.kt b/src/com/maddyhome/idea/vim/action/motion/text/MotionWordRightAction.kt index a85eed6f11..83902f8e27 100644 --- a/src/com/maddyhome/idea/vim/action/motion/text/MotionWordRightAction.kt +++ b/src/com/maddyhome/idea/vim/action/motion/text/MotionWordRightAction.kt @@ -51,9 +51,7 @@ class MotionWordRightInsertAction : MotionActionHandler.ForEachCaret(), Complica override val keyStrokesSet: Set> = setOf( listOf(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.CTRL_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, KeyEvent.CTRL_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK)), - listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, KeyEvent.SHIFT_DOWN_MASK)) + listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, KeyEvent.CTRL_DOWN_MASK)) ) override val flags: EnumSet = enumSetOf(CommandFlags.FLAG_SAVE_STROKE)