|
1 | 1 | 'use strict'; |
2 | 2 | import { Objects, Versions } from './system'; |
3 | 3 | 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'; |
5 | 5 | import { CommandContext, ExtensionKey, GlobalState, QualifiedExtensionId, setCommandContext } from './constants'; |
6 | 6 | import { Commands, configureCommands } from './commands'; |
7 | 7 | import { Container } from './container'; |
@@ -173,6 +173,28 @@ async function migrateSettings(context: ExtensionContext, previousVersion: strin |
173 | 173 | await configuration.migrate<boolean, OutputLevel>('debug', configuration.name('outputLevel').value, v => v ? OutputLevel.Debug : configuration.get(configuration.name('outputLevel').value)); |
174 | 174 | await configuration.migrate('debug', configuration.name('debug').value, v => undefined); |
175 | 175 | } |
| 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 | + } |
176 | 198 | } |
177 | 199 | catch (ex) { |
178 | 200 | Logger.error(ex, 'migrateSettings'); |
|
0 commit comments