From 6514b47f5d9c983bf6169e34fb9de6767940db1a Mon Sep 17 00:00:00 2001 From: Horace He Date: Wed, 31 Jan 2018 00:15:15 -0500 Subject: [PATCH 1/3] Fixes #2346 --- src/cmd_line/commandLine.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/cmd_line/commandLine.ts b/src/cmd_line/commandLine.ts index 4a961c748a8..1b569dab448 100644 --- a/src/cmd_line/commandLine.ts +++ b/src/cmd_line/commandLine.ts @@ -38,14 +38,17 @@ export class CommandLine { await cmd.execute(vimState.editor, vimState); } } catch (e) { - console.log(e); if (e instanceof VimError) { - StatusBar.SetText( - `${e.toString()}. ${command}`, - vimState.currentMode, - vimState.isRecordingMacro, - true - ); + if (e.code === ErrorCode.E492) { + await Neovim.command(vimState, command); + } else { + StatusBar.SetText( + `${e.toString()}. ${command}`, + vimState.currentMode, + vimState.isRecordingMacro, + true + ); + } } else { util.showError(e.toString()); } From 39c312fb4e159b75871ab664e6b53a5400c98a31 Mon Sep 17 00:00:00 2001 From: Horace He Date: Wed, 31 Jan 2018 10:22:41 -0500 Subject: [PATCH 2/3] made sure neovim commands only ran with neovim enabled --- src/cmd_line/commandLine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd_line/commandLine.ts b/src/cmd_line/commandLine.ts index 1b569dab448..de5b0dc2026 100644 --- a/src/cmd_line/commandLine.ts +++ b/src/cmd_line/commandLine.ts @@ -39,7 +39,7 @@ export class CommandLine { } } catch (e) { if (e instanceof VimError) { - if (e.code === ErrorCode.E492) { + if (e.code === ErrorCode.E492 && Configuration.enableNeovim) { await Neovim.command(vimState, command); } else { StatusBar.SetText( From 805d3a480e0eb59ebe32e8183f554de1927b3a27 Mon Sep 17 00:00:00 2001 From: Horace He Date: Sat, 10 Feb 2018 20:35:46 -0500 Subject: [PATCH 3/3] Tried moving stuff into a different scope to fix bizarre travis error --- src/cmd_line/commandLine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd_line/commandLine.ts b/src/cmd_line/commandLine.ts index de5b0dc2026..4d1f2688eba 100644 --- a/src/cmd_line/commandLine.ts +++ b/src/cmd_line/commandLine.ts @@ -39,7 +39,7 @@ export class CommandLine { } } catch (e) { if (e instanceof VimError) { - if (e.code === ErrorCode.E492 && Configuration.enableNeovim) { + if (e.code === ErrorCode.E492 && configuration.enableNeovim) { await Neovim.command(vimState, command); } else { StatusBar.SetText(