Skip to content

Commit

Permalink
made sure neovim commands only ran with neovim enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Chillee committed Jan 31, 2018
1 parent d854bed commit 762dd48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd_line/commandLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export class CommandLine {
return;
}

const useNeovim = Configuration.enableNeovim && cmd.command && cmd.command.neovimCapable;
try {
const cmd = parser.parse(command);
const useNeovim = Configuration.enableNeovim && cmd.command && cmd.command.neovimCapable;

if (useNeovim) {
await Neovim.command(vimState, command);
Expand All @@ -39,7 +39,7 @@ export class CommandLine {
}
} catch (e) {
if (e instanceof VimError) {
if (e.code === ErrorCode.E492) {
if (e.code === ErrorCode.E492 && useNeovim ) {
await Neovim.command(vimState, command);
} else {
StatusBar.SetText(
Expand Down

0 comments on commit 762dd48

Please sign in to comment.