message: Add non error status messages when neovim commands return a status
diff: @@ -37,6 +37,7 @@ export class Neovim implements vscode.Disposable {
  // Clear the previous error code. API does not allow setVvar so do it manually
  await this.nvim.command('let v:errmsg=""');
  + await this.nvim.command('let v:statusmsg=""');
  // Execute the command
  await this.nvim.input(command);
  @@ -44,21 +45,24 @@ export class Neovim implements vscode.Disposable {
  await this.nvim.input('<esc>');
  }
  - // Check if an error occurred, then sync buffer back to vscode if command
  - // did not return an error
  + // Check if an error occurred, then sync buffer back to vscode if command did not return an error
  const errMsg = await this.nvim.getVvar('errmsg');
  + let statusBarText = '';
  if (errMsg && errMsg.toString() !== '') {
  - StatusBar.SetText(
  - errMsg.toString(),
  - vimState.currentMode,
  - vimState.isRecordingMacro,
  - true,
  - true
  - );
  + statusBarText = errMsg.toString();
  } else {
  + // Check to see if a status message was updated
  + const statusMsg = await this.nvim.getVvar('statusmsg');
  + if (statusMsg && statusMsg.toString() !== '') {
  + statusBarText = statusMsg.toString();
  + }
  +
  await this.syncVimToVs(vimState);
  }
  + // Lastly update the status bar
  + StatusBar.SetText(statusBarText, vimState.currentMode, vimState.isRecordingMacro, true, true);
  +
  return;
  }
  