diff --git a/package.json b/package.json index 24abc04b..96309152 100644 --- a/package.json +++ b/package.json @@ -493,6 +493,11 @@ }, "description": "An object specifying the default visibility of the Date, Author & Commit columns. Example: {\"Date\": true, \"Author\": true, \"Commit\": true}" }, + "git-graph.stickyHeader": { + "type": "boolean", + "default": true, + "description": "Keeps the header visible when the view is scrolled" + }, "git-graph.dialog.addTag.pushToRemote": { "type": "boolean", "default": false, diff --git a/src/config.ts b/src/config.ts index d5dc870b..2a91f3fe 100644 --- a/src/config.ts +++ b/src/config.ts @@ -545,6 +545,13 @@ class Config { return !!this.config.get('showStatusBarItem', true); } + /** + * Get the value of the `git-graph.stickyHeader` Extension Setting. + */ + get stickyHeader() { + return !!this.config.get('stickyHeader', true); + } + /** * Get the value of the `git-graph.tabIconColourTheme` Extension Setting. */ diff --git a/src/gitGraphView.ts b/src/gitGraphView.ts index 3fa92f21..6c08748d 100644 --- a/src/gitGraphView.ts +++ b/src/gitGraphView.ts @@ -639,6 +639,7 @@ export class GitGraphView extends Disposable { customPullRequestProviders: config.customPullRequestProviders, dateFormat: config.dateFormat, defaultColumnVisibility: config.defaultColumnVisibility, + stickyHeader: config.stickyHeader, dialogDefaults: config.dialogDefaults, enhancedAccessibility: config.enhancedAccessibility, fetchAndPrune: config.fetchAndPrune, @@ -681,9 +682,10 @@ export class GitGraphView extends Disposable {
${UNABLE_TO_FIND_GIT_MSG}