Skip to content

Commit

Permalink
<C-d> disabled by default unless been set true
Browse files Browse the repository at this point in the history
  • Loading branch information
Curvas authored and jpoon committed Jan 13, 2018
1 parent f42d60c commit 3424333
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/mode/modeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,17 +287,10 @@ export class ModeHandler implements vscode.Disposable {
}
}

// Now keep the remapping but check if <C-d> is explicitly defined
// within the handleKeys scope firstly
if (key === '<C-d>') {
const useKeyCtrlD = Configuration.handleKeys['<C-d>'];
if (useKeyCtrlD !== undefined) {
if (!useKeyCtrlD) {
key = '<D-d>';
}
} else if (!Configuration.useCtrlKeys) {
key = '<D-d>';
}
// <C-d> triggers "add selection to next find match" by default,
// unless users explicity make <C-d>: true
if (key === '<C-d>' && !(Configuration.handleKeys['<C-d>'] === true)) {
key = '<D-d>';
}

this.vimState.cursorPositionJustBeforeAnythingHappened = this.vimState.allCursors.map(
Expand Down

0 comments on commit 3424333

Please sign in to comment.