Skip to content

Commit

Permalink
Merge pull request #1254 from xconverge/surround-fixes
Browse files Browse the repository at this point in the history
Added tag text to status bar in surround mode
  • Loading branch information
johnfn authored Jan 31, 2017
2 parents 2fad1a3 + 1cc10e6 commit da6469e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/mode/modeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1670,12 +1670,12 @@ export class ModeHandler implements vscode.Disposable {
this.vimState.postponedCodeViewChanges = [];

if (this.currentMode.name === ModeName.SearchInProgressMode) {
this.setStatusBarText(`Searching for: ${ this.vimState.globalState.searchState!.searchString }`);
this.setStatusBarText(`Searching for: ${this.vimState.globalState.searchState!.searchString}`);
} else if (this.currentMode.name === ModeName.EasyMotionMode) {
// Update all EasyMotion decorations
this._vimState.easyMotion.updateDecorations();

this.setStatusBarText(`Current depth: ${ this.vimState.easyMotion.accumulation }`);
this.setStatusBarText(`Current depth: ${this.vimState.easyMotion.accumulation}`);
} else {
this._renderStatusBar();
}
Expand All @@ -1697,6 +1697,15 @@ export class ModeHandler implements vscode.Disposable {
currentCommandText = ` ${ this._vimState.globalState.searchState!.searchString }`;
}

if (this._vimState.currentMode === ModeName.SurroundInputMode) {
if (this._vimState.surround !== undefined) {
const surroundText = this._vimState.surround.replacement;
if (surroundText !== undefined) {
currentCommandText = surroundText;
}
}
}

this.setStatusBarText(`${ modeText }${ currentCommandText }${ macroText }`);
}

Expand Down

0 comments on commit da6469e

Please sign in to comment.