Преглед изворни кода

Renames overviewRuler highlight to overview

main
Eric Amodio пре 6 година
родитељ
комит
45fc80a2cf
6 измењених фајлова са 38 додато и 16 уклоњено
  1. +2
    -2
      README.md
  2. +6
    -6
      package.json
  3. +2
    -2
      src/annotations/annotationController.ts
  4. +23
    -1
      src/extension.ts
  5. +1
    -1
      src/ui/config.ts
  6. +4
    -4
      src/ui/settings/index.html

+ 2
- 2
README.md Прегледај датотеку

@ -553,7 +553,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
|`gitlens.blame.heatmap.enabled`|Specifies whether to provide a heatmap indicator in the gutter blame annotations
|`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
|`gitlens.blame.highlight.enabled`|Specifies whether to highlight lines associated with the current line
|`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)
|`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)
|`gitlens.blame.ignoreWhitespace`|Specifies whether to ignore whitespace when comparing revisions during blame operations
|`gitlens.blame.separateLines`|Specifies whether gutter blame annotations will have line separators
@ -575,7 +575,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
|Name | Description
|-----|------------
|`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)
|`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)
### Status Bar Settings

+ 6
- 6
package.json Прегледај датотеку

@ -101,20 +101,20 @@
"default": [
"gutter",
"line",
"overviewRuler"
"overview"
],
"items": {
"type": "string",
"enum": [
"gutter",
"line",
"overviewRuler"
"overview"
]
},
"minItems": 1,
"maxItems": 3,
"uniqueItems": true,
"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)",
"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)",
"scope": "window"
},
"gitlens.blame.ignoreWhitespace": {
@ -555,20 +555,20 @@
"default": [
"gutter",
"line",
"overviewRuler"
"overview"
],
"items": {
"type": "string",
"enum": [
"gutter",
"line",
"overviewRuler"
"overview"
]
},
"minItems": 1,
"maxItems": 3,
"uniqueItems": true,
"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)",
"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)",
"scope": "window"
},
"gitlens.remotes": {

+ 2
- 2
src/annotations/annotationController.ts Прегледај датотеку

@ -83,7 +83,7 @@ export class AnnotationController extends Disposable {
backgroundColor: cfgHighlight.locations.includes(HighlightLocations.Line)
? new ThemeColor('gitlens.lineHighlightBackgroundColor')
: undefined,
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.OverviewRuler)
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.Overview)
? new ThemeColor('gitlens.lineHighlightOverviewRulerColor')
: undefined,
dark: {
@ -115,7 +115,7 @@ export class AnnotationController extends Disposable {
backgroundColor: cfgHighlight.locations.includes(HighlightLocations.Line)
? new ThemeColor('gitlens.lineHighlightBackgroundColor')
: undefined,
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.OverviewRuler)
overviewRulerColor: cfgHighlight.locations.includes(HighlightLocations.Overview)
? new ThemeColor('gitlens.lineHighlightOverviewRulerColor')
: undefined,
dark: {

+ 23
- 1
src/extension.ts Прегледај датотеку

@ -1,7 +1,7 @@
'use strict';
import { Objects, Versions } from './system';
import { commands, ConfigurationTarget, ExtensionContext, extensions, window, workspace } from 'vscode';
import { CodeLensLanguageScope, CodeLensScopes, configuration, Configuration, IConfig, OutputLevel } from './configuration';
import { CodeLensLanguageScope, CodeLensScopes, configuration, Configuration, HighlightLocations, IConfig, OutputLevel } from './configuration';
import { CommandContext, ExtensionKey, GlobalState, QualifiedExtensionId, setCommandContext } from './constants';
import { Commands, configureCommands } from './commands';
import { Container } from './container';
@ -173,6 +173,28 @@ async function migrateSettings(context: ExtensionContext, previousVersion: strin
await configuration.migrate<boolean, OutputLevel>('debug', configuration.name('outputLevel').value, v => v ? OutputLevel.Debug : configuration.get(configuration.name('outputLevel').value));
await configuration.migrate('debug', configuration.name('debug').value, v => undefined);
}
if (Versions.compare(previous, Versions.from(8, 0, 0, 'rc')) !== 1) {
let section = configuration.name('blame')('highlight')('locations').value;
await configuration.migrate<('gutter' | 'line' | 'overviewRuler')[], HighlightLocations[]>(section, section,
v => {
const index = v.indexOf('overviewRuler');
if (index !== -1) {
v.splice(index, 1, 'overview' as 'overviewRuler');
}
return v as HighlightLocations[];
});
section = configuration.name('recentChanges')('highlight')('locations').value;
await configuration.migrate<('gutter' | 'line' | 'overviewRuler')[], HighlightLocations[]>(section, section,
v => {
const index = v.indexOf('overviewRuler');
if (index !== -1) {
v.splice(index, 1, 'overview' as 'overviewRuler');
}
return v as HighlightLocations[];
});
}
}
catch (ex) {
Logger.error(ex, 'migrateSettings');

+ 1
- 1
src/ui/config.ts Прегледај датотеку

@ -69,7 +69,7 @@ export enum GravatarDefaultStyle {
export enum HighlightLocations {
Gutter = 'gutter',
Line = 'line',
OverviewRuler = 'overviewRuler'
Overview = 'overview'
}
export enum KeyMap {

+ 4
- 4
src/ui/settings/index.html Прегледај датотеку

@ -331,7 +331,7 @@
<label for="blame.highlight.locations-1">Add line highlight</label>
</div>
<div class="settings-group__setting nowrap ml-2" data-enablement="blame.highlight.enabled" disabled>
<input class="setting" id="blame.highlight.locations-2" name="blame.highlight.locations" type="checkbox" value="overviewRuler" data-type="array" disabled />
<input class="setting" id="blame.highlight.locations-2" name="blame.highlight.locations" type="checkbox" value="overview" data-type="array" disabled />
<label for="blame.highlight.locations-2">Add scroll bar highlight</label>
</div>
@ -348,7 +348,7 @@
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-avatars-compact.png" data-visibility="blame.avatars &amp; blame.compact" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-gutter.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +gutter" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-line.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +line" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-scrollbar.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +overviewRuler" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-highlight-scrollbar.png" data-visibility="blame.highlight.enabled &amp; blame.highlight.locations +overview" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-heatmap-left.png" data-visibility="blame.heatmap.enabled &amp; blame.heatmap.location =left" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/blame-heatmap-right.png" data-visibility="blame.heatmap.enabled &amp; blame.heatmap.location =right" />
</div>
@ -485,7 +485,7 @@
<label for="recentChanges.highlight.locations-1">Add line highlight</label>
</div>
<div class="settings-group__setting nowrap">
<input class="setting" id="recentChanges.highlight.locations-2" name="recentChanges.highlight.locations" type="checkbox" value="overviewRuler" data-type="array" />
<input class="setting" id="recentChanges.highlight.locations-2" name="recentChanges.highlight.locations" type="checkbox" value="overview" data-type="array" />
<label for="recentChanges.highlight.locations-2">Add scroll bar highlight</label>
</div>
</div>
@ -493,7 +493,7 @@
<img class="image__preview" src="{{root}}/images/settings/recent-changes.png" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-gutter.png" data-visibility="recentChanges.highlight.locations +gutter" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-line.png" data-visibility="recentChanges.highlight.locations +line" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-scrollbar.png" data-visibility="recentChanges.highlight.locations +overviewRuler" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/recent-changes-highlight-scrollbar.png" data-visibility="recentChanges.highlight.locations +overview" />
</div>
<p class="settings-group__hint">
<i class="icon icon--lg icon__info"></i>

Loading…
Откажи
Сачувај