Skip to content

Commit 45fc80a

Browse files
committed
Renames overviewRuler highlight to overview
1 parent da32e25 commit 45fc80a

File tree

6 files changed

+38
-16
lines changed

6 files changed

+38
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
553553
|`gitlens.blame.heatmap.enabled`|Specifies whether to provide a heatmap indicator in the gutter blame annotations
554554
|`gitlens.blame.heatmap.location`|Specifies where the heatmap indicators will be shown in the gutter blame annotations<br />`left` - adds a heatmap indicator on the left edge of the gutter blame annotations<br />`right` - adds a heatmap indicator on the right edge of the gutter blame annotations
555555
|`gitlens.blame.highlight.enabled`|Specifies whether to highlight lines associated with the current line
556-
|`gitlens.blame.highlight.locations`|Specifies where the associated line highlights will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
556+
|`gitlens.blame.highlight.locations`|Specifies where the associated line highlights will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overview` - adds a decoration to the overview ruler (scroll bar)
557557
|`gitlens.blame.ignoreWhitespace`|Specifies whether to ignore whitespace when comparing revisions during blame operations
558558
|`gitlens.blame.separateLines`|Specifies whether gutter blame annotations will have line separators
559559

@@ -575,7 +575,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
575575

576576
|Name | Description
577577
|-----|------------
578-
|`gitlens.recentChanges.highlight.locations`|Specifies where the highlights of the recently changed lines will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
578+
|`gitlens.recentChanges.highlight.locations`|Specifies where the highlights of the recently changed lines will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overview` - adds a decoration to the overview ruler (scroll bar)
579579

580580
### Status Bar Settings
581581

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@
101101
"default": [
102102
"gutter",
103103
"line",
104-
"overviewRuler"
104+
"overview"
105105
],
106106
"items": {
107107
"type": "string",
108108
"enum": [
109109
"gutter",
110110
"line",
111-
"overviewRuler"
111+
"overview"
112112
]
113113
},
114114
"minItems": 1,
115115
"maxItems": 3,
116116
"uniqueItems": true,
117-
"description": "Specifies where the associated line highlights will be shown\n `gutter` - adds a gutter glyph\n `line` - adds a full-line highlight background color\n `overviewRuler` - adds a decoration to the overviewRuler (scroll bar)",
117+
"description": "Specifies where the associated line highlights will be shown\n `gutter` - adds a gutter glyph\n `line` - adds a full-line highlight background color\n `overview` - adds a decoration to the overview ruler (scroll bar)",
118118
"scope": "window"
119119
},
120120
"gitlens.blame.ignoreWhitespace": {
@@ -555,20 +555,20 @@
555555
"default": [
556556
"gutter",
557557
"line",
558-
"overviewRuler"
558+
"overview"
559559
],
560560
"items": {
561561
"type": "string",
562562
"enum": [
563563
"gutter",
564564
"line",
565-
"overviewRuler"
565+
"overview"
566566
]
567567
},
568568
"minItems": 1,
569569
"maxItems": 3,
570570
"uniqueItems": true,
571-
"description": "Specifies where the highlights of the recently changed lines will be shown\n `gutter` - adds a gutter glyph\n `line` - adds a full-line highlight background color\n `overviewRuler` - adds a decoration to the overviewRuler (scroll bar)",
571+
"description": "Specifies where the highlights of the recently changed lines will be shown\n `gutter` - adds a gutter glyph\n `line` - adds a full-line highlight background color\n `overview` - adds a decoration to the overview ruler (scroll bar)",
572572
"scope": "window"
573573
},
574574
"gitlens.remotes": {

src/annotations/annotationController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class AnnotationController extends Disposable {
8383
backgroundColor: cfgHighlight.locations.includes(HighlightLocations.Line)
8484
? new ThemeColor('gitlens.lineHighlightBackgroundColor')
8585
: undefined,
86-
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.OverviewRuler)
86+
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.Overview)
8787
? new ThemeColor('gitlens.lineHighlightOverviewRulerColor')
8888
: undefined,
8989
dark: {
@@ -115,7 +115,7 @@ export class AnnotationController extends Disposable {
115115
backgroundColor: cfgHighlight.locations.includes(HighlightLocations.Line)
116116
? new ThemeColor('gitlens.lineHighlightBackgroundColor')
117117
: undefined,
118-
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.OverviewRuler)
118+
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.Overview)
119119
? new ThemeColor('gitlens.lineHighlightOverviewRulerColor')
120120
: undefined,
121121
dark: {

src/extension.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
import { Objects, Versions } from './system';
33
import { commands, ConfigurationTarget, ExtensionContext, extensions, window, workspace } from 'vscode';
4-
import { CodeLensLanguageScope, CodeLensScopes, configuration, Configuration, IConfig, OutputLevel } from './configuration';
4+
import { CodeLensLanguageScope, CodeLensScopes, configuration, Configuration, HighlightLocations, IConfig, OutputLevel } from './configuration';
55
import { CommandContext, ExtensionKey, GlobalState, QualifiedExtensionId, setCommandContext } from './constants';
66
import { Commands, configureCommands } from './commands';
77
import { Container } from './container';
@@ -173,6 +173,28 @@ async function migrateSettings(context: ExtensionContext, previousVersion: strin
173173
await configuration.migrate<boolean, OutputLevel>('debug', configuration.name('outputLevel').value, v => v ? OutputLevel.Debug : configuration.get(configuration.name('outputLevel').value));
174174
await configuration.migrate('debug', configuration.name('debug').value, v => undefined);
175175
}
176+
177+
if (Versions.compare(previous, Versions.from(8, 0, 0, 'rc')) !== 1) {
178+
let section = configuration.name('blame')('highlight')('locations').value;
179+
await configuration.migrate<('gutter' | 'line' | 'overviewRuler')[], HighlightLocations[]>(section, section,
180+
v => {
181+
const index = v.indexOf('overviewRuler');
182+
if (index !== -1) {
183+
v.splice(index, 1, 'overview' as 'overviewRuler');
184+
}
185+
return v as HighlightLocations[];
186+
});
187+
188+
section = configuration.name('recentChanges')('highlight')('locations').value;
189+
await configuration.migrate<('gutter' | 'line' | 'overviewRuler')[], HighlightLocations[]>(section, section,
190+
v => {
191+
const index = v.indexOf('overviewRuler');
192+
if (index !== -1) {
193+
v.splice(index, 1, 'overview' as 'overviewRuler');
194+
}
195+
return v as HighlightLocations[];
196+
});
197+
}
176198
}
177199
catch (ex) {
178200
Logger.error(ex, 'migrateSettings');

src/ui/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export enum GravatarDefaultStyle {
6969
export enum HighlightLocations {
7070
Gutter = 'gutter',
7171
Line = 'line',
72-
OverviewRuler = 'overviewRuler'
72+
Overview = 'overview'
7373
}
7474

7575
export enum KeyMap {

src/ui/settings/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ <h2 class="section__title">Gutter Blame
331331
<label for="blame.highlight.locations-1">Add line highlight</label>
332332
</div>
333333
<div class="settings-group__setting nowrap ml-2" data-enablement="blame.highlight.enabled" disabled>
334-
<input class="setting" id="blame.highlight.locations-2" name="blame.highlight.locations" type="checkbox" value="overviewRuler" data-type="array" disabled />
334+
<input class="setting" id="blame.highlight.locations-2" name="blame.highlight.locations" type="checkbox" value="overview" data-type="array" disabled />
335335
<label for="blame.highlight.locations-2">Add scroll bar highlight</label>
336336
</div>
337337

@@ -348,7 +348,7 @@ <h2 class="section__title">Gutter Blame
348348
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-avatars-compact.png" data-visibility="blame.avatars &amp; blame.compact" />
349349
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-gutter.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +gutter" />
350350
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-line.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +line" />
351-
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-scrollbar.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +overviewRuler" />
351+
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-scrollbar.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +overview" />
352352
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-heatmap-left.png" data-visibility="blame.heatmap.enabled &amp; blame.heatmap.location =left" />
353353
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-heatmap-right.png" data-visibility="blame.heatmap.enabled &amp; blame.heatmap.location =right" />
354354
</div>
@@ -485,15 +485,15 @@ <h2 class="section__title">Recent Changes
485485
<label for="recentChanges.highlight.locations-1">Add line highlight</label>
486486
</div>
487487
<div class="settings-group__setting nowrap">
488-
<input class="setting" id="recentChanges.highlight.locations-2" name="recentChanges.highlight.locations" type="checkbox" value="overviewRuler" data-type="array" />
488+
<input class="setting" id="recentChanges.highlight.locations-2" name="recentChanges.highlight.locations" type="checkbox" value="overview" data-type="array" />
489489
<label for="recentChanges.highlight.locations-2">Add scroll bar highlight</label>
490490
</div>
491491
</div>
492492
<div class="section__preview">
493493
<img class="image__preview" src="{{root}}/images/settings/recent-changes.png" />
494494
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-gutter.png" data-visibility="recentChanges.highlight.locations +gutter" />
495495
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-line.png" data-visibility="recentChanges.highlight.locations +line" />
496-
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-scrollbar.png" data-visibility="recentChanges.highlight.locations +overviewRuler" />
496+
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-scrollbar.png" data-visibility="recentChanges.highlight.locations +overview" />
497497
</div>
498498
<p class="settings-group__hint">
499499
<i class="icon icon--lg icon__info"></i>

0 commit comments

Comments
 (0)