From 16724d9d24c4435d9ea95d267296ff348d79a096 Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Wed, 5 Oct 2016 01:14:25 -0700 Subject: [PATCH] fixes #832 (#837) --- src/mode/modeHandler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index d9fb0d65bf8..c5677128711 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -460,7 +460,9 @@ export class ModeHandler implements vscode.Disposable { return; } - if (!e.kind || e.kind === vscode.TextEditorSelectionChangeKind.Command) { + // e.kind can sometimes be undefined according to the docs for + // TextEditorSelectionChangeKind, so do not check for !e.kind + if (e.kind === vscode.TextEditorSelectionChangeKind.Command) { return; }