diff --git a/package.json b/package.json index 64e090d..a450175 100644 --- a/package.json +++ b/package.json @@ -3182,15 +3182,15 @@ }, { "command": "gitlens.views.fileHistory.setCursorFollowingOn", - "title": "Follow the Cursor", + "title": "Toggle Mode (File)", "category": "GitLens", - "icon": "$(eye)" + "icon": "$(file)" }, { "command": "gitlens.views.fileHistory.setCursorFollowingOff", - "title": "Unfollow the Cursor", + "title": "Toggle Mode (Line)", "category": "GitLens", - "icon": "$(eye-closed)" + "icon": "$(list-selection)" }, { "command": "gitlens.views.fileHistory.setRenameFollowingOn", diff --git a/src/views/fileHistoryView.ts b/src/views/fileHistoryView.ts index aff24f7..9997658 100644 --- a/src/views/fileHistoryView.ts +++ b/src/views/fileHistoryView.ts @@ -134,12 +134,13 @@ export class FileHistoryView extends ViewBase> implements TreeData this.updateTitle(); } + private _updateTitleDebounced: (() => void) | undefined = undefined; private updateTitle() { if (this._tree == null) return; + if (this._updateTitleDebounced === undefined) { + this._updateTitleDebounced = Functions.debounce(this.updateTitleCore.bind(this), 100); + } + + this._updateTitleDebounced(); + } + + private updateTitleCore() { + if (this._tree == null) return; + this._tree.title = `${this.title}${this.titleContext ? ` ${GlyphChars.Dot} ${this.titleContext}` : ''}${ this.description ? ` ${this.description}` : '' }`;