From 52d1a78277ba70e1ce3438968968c13853dbac71 Mon Sep 17 00:00:00 2001 From: Horace He Date: Wed, 21 Jun 2017 15:21:46 -0700 Subject: [PATCH] Changed all editorscroll commands to work in all visual modes --- src/actions/commands/actions.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index e63dbc0802d..bad1e711662 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -522,7 +522,7 @@ class CommandCtrlOpenBracket extends CommandEsc { } abstract class CommandEditorScroll extends BaseCommand { - modes = [ModeName.Normal]; + modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock]; runsOnceForEachCountPrefix = false; keys: string[]; to: EditorScrollDirection; @@ -561,7 +561,6 @@ class CommandCtrlY extends CommandEditorScroll { @RegisterAction class CommandMoveFullPageUp extends CommandEditorScroll { - modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock]; keys = [""]; to: EditorScrollDirection = "up"; by: EditorScrollByUnit = "page"; @@ -569,7 +568,6 @@ class CommandMoveFullPageUp extends CommandEditorScroll { @RegisterAction class CommandMoveFullPageDown extends CommandEditorScroll { - modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock]; keys = [""]; to: EditorScrollDirection = "down"; by: EditorScrollByUnit = "page"; @@ -577,7 +575,6 @@ class CommandMoveFullPageDown extends CommandEditorScroll { @RegisterAction class CommandMoveHalfPageDown extends CommandEditorScroll { - modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock]; keys = [""]; to: EditorScrollDirection = "down"; by: EditorScrollByUnit = "halfPage"; @@ -585,7 +582,6 @@ class CommandMoveHalfPageDown extends CommandEditorScroll { @RegisterAction class CommandMoveHalfPageUp extends CommandEditorScroll { - modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine, ModeName.VisualBlock]; keys = [""]; to: EditorScrollDirection = "up"; by: EditorScrollByUnit = "halfPage"; @@ -1080,7 +1076,7 @@ export class MarkCommand extends BaseCommand { public async exec(position: Position, vimState: VimState): Promise { const markName = this.keysPressed[1]; - + vimState.historyTracker.addMark(position, markName); return vimState; }