From 130096e124d5af82014ca18813c04baca21dcd30 Mon Sep 17 00:00:00 2001 From: Arxzin Date: Sun, 7 Jan 2018 14:42:40 +0800 Subject: [PATCH 1/3] remapping from C-d to D-d now check if C-d is explicitly defined which match the standard *handlekeys config trumps usectrlkeys config* --- src/mode/modeHandler.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index 0a257e9b2d3..23093136d5d 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -285,9 +285,21 @@ export class ModeHandler implements vscode.Disposable { } } } - if (key === '' && !Configuration.useCtrlKeys) { - key = ''; + + // #2162 fixed by 5cc821e except key due to this remapping + // Now keep the remapping but check if is explicitly defined + // within the handleKeys scope firstly + if (key === '') { + const useKeyCtrlD = Configuration.handleKeys['']; + if (useKeyCtrlD !== undefined) { + if (!useKeyCtrlD) { + key = ''; + } + } else if (!Configuration.useCtrlKeys) { + key = ''; + } } + this.vimState.cursorPositionJustBeforeAnythingHappened = this.vimState.allCursors.map( x => x.stop ); From 88214a99950c43bfd6b8fd3b4faa79318489db52 Mon Sep 17 00:00:00 2001 From: Curvas Date: Thu, 11 Jan 2018 22:25:20 +0800 Subject: [PATCH 2/3] remove a comment line --- src/mode/modeHandler.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index 23093136d5d..12f9aa63c66 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -286,7 +286,6 @@ export class ModeHandler implements vscode.Disposable { } } - // #2162 fixed by 5cc821e except key due to this remapping // Now keep the remapping but check if is explicitly defined // within the handleKeys scope firstly if (key === '') { From 69c9d2775ac521a10160142b41203cc9bb5b51b5 Mon Sep 17 00:00:00 2001 From: Curvas Date: Fri, 12 Jan 2018 20:34:46 +0800 Subject: [PATCH 3/3] disabled by default unless been set true --- src/mode/modeHandler.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index 12f9aa63c66..4157e44f1b1 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -286,17 +286,10 @@ export class ModeHandler implements vscode.Disposable { } } - // Now keep the remapping but check if is explicitly defined - // within the handleKeys scope firstly - if (key === '') { - const useKeyCtrlD = Configuration.handleKeys['']; - if (useKeyCtrlD !== undefined) { - if (!useKeyCtrlD) { - key = ''; - } - } else if (!Configuration.useCtrlKeys) { - key = ''; - } + // triggers "add selection to next find match" by default, + // unless users explicity make : true + if (key === '' && !(Configuration.handleKeys[''] === true)) { + key = ''; } this.vimState.cursorPositionJustBeforeAnythingHappened = this.vimState.allCursors.map(