diff --git a/src/annotations/annotationController.ts b/src/annotations/annotationController.ts index fc95852..e23eb21 100644 --- a/src/annotations/annotationController.ts +++ b/src/annotations/annotationController.ts @@ -89,9 +89,8 @@ export class AnnotationController extends Disposable { configuration.changed(e, configuration.name('theme')('lineHighlight').value)) { Decorations.blameHighlight && Decorations.blameHighlight.dispose(); - if (cfg === undefined) { - cfg = configuration.get(); - } + cfg = configuration.get(); + const cfgHighlight = cfg.blame.file.lineHighlight; const cfgTheme = cfg.theme.lineHighlight; diff --git a/src/commands/openFileRevision.ts b/src/commands/openFileRevision.ts index e622f22..b0d416b 100644 --- a/src/commands/openFileRevision.ts +++ b/src/commands/openFileRevision.ts @@ -1,7 +1,7 @@ 'use strict'; import { Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode'; import { AnnotationController, FileAnnotationType } from '../annotations/annotationController'; -import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common'; +import { ActiveEditorCommand, Commands, openEditor } from './common'; import { Logger } from '../logger'; export interface OpenFileRevisionCommandArgs { @@ -40,8 +40,6 @@ export class OpenFileRevisionCommand extends ActiveEditorCommand { } async execute(editor: TextEditor, uri?: Uri, args: OpenFileRevisionCommandArgs = {}) { - uri = getCommandUri(uri, editor); - args = { ...args }; if (args.line === undefined) { args.line = editor === undefined ? 0 : editor.selection.active.line; diff --git a/src/commands/openInRemote.ts b/src/commands/openInRemote.ts index ae226c5..0f89e0f 100644 --- a/src/commands/openInRemote.ts +++ b/src/commands/openInRemote.ts @@ -1,7 +1,7 @@ 'use strict'; import { Strings } from '../system'; import { TextEditor, Uri, window } from 'vscode'; -import { ActiveEditorCommand, Commands, getCommandUri } from './common'; +import { ActiveEditorCommand, Commands } from './common'; import { GlyphChars } from '../constants'; import { GitLogCommit, GitRemote, GitService, RemoteResource, RemoteResourceType } from '../gitService'; import { Logger } from '../logger'; @@ -22,8 +22,6 @@ export class OpenInRemoteCommand extends ActiveEditorCommand { } async execute(editor: TextEditor, uri?: Uri, args: OpenInRemoteCommandArgs = {}) { - uri = getCommandUri(uri, editor); - args = { ...args }; if (args.remotes === undefined || args.resource === undefined) return undefined; diff --git a/src/git/git.ts b/src/git/git.ts index 7dbfd03..2ebd883 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -103,7 +103,7 @@ function gitCommandDefaultErrorHandler(ex: Error, options: GitCommandOptions, .. if (msg) { for (const warning of GitWarnings) { if (warning.test(msg)) { - Logger.warn('git', ...args, ` cwd='${options.cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`); + Logger.warn('git', ...args, ` cwd='${options.cwd}'`, `\n ${msg.replace(/\r?\n|\r/g, ' ')}`); return ''; } } diff --git a/src/git/parsers/logParser.ts b/src/git/parsers/logParser.ts index 00e734e..004b047 100644 --- a/src/git/parsers/logParser.ts +++ b/src/git/parsers/logParser.ts @@ -175,7 +175,7 @@ export class GitLogParser { } } else { - next = lines.next(); + lines.next(); next = lines.next(); i += 2; diff --git a/src/gitService.ts b/src/gitService.ts index 3019932..a69f230 100644 --- a/src/gitService.ts +++ b/src/gitService.ts @@ -277,7 +277,7 @@ export class GitService extends Disposable { } // Can remove this try/catch once https://github.com/Microsoft/vscode/issues/38229 is fixed - let depth = 1; + let depth; try { depth = configuration.get(configuration.name('advanced')('repositorySearchDepth').value, folderUri); } @@ -934,7 +934,7 @@ export class GitService extends Disposable { const cachedLog = entry.get('log'); if (cachedLog !== undefined) { if (sha === undefined) { - Logger.log(`getLogForFile[Cached(~${key})]('${repoPath}', '${fileName}', '${sha}', ${options.maxCount}, undefined, ${options.reverse}, ${options.skipMerges})`); + Logger.log(`getLogForFile[Cached(~${key})]('${repoPath}', '${fileName}', '', ${options.maxCount}, undefined, ${options.reverse}, ${options.skipMerges})`); return cachedLog.item; } diff --git a/src/system/string.ts b/src/system/string.ts index ef05b47..85e27d7 100644 --- a/src/system/string.ts +++ b/src/system/string.ts @@ -64,7 +64,7 @@ export namespace Strings { export function padLeft(s: string, padTo: number, padding: string = '\u00a0') { const diff = padTo - width(s); - return (diff <= 0) ? s : '\u00a0'.repeat(diff) + s; + return (diff <= 0) ? s : padding.repeat(diff) + s; } export function padLeftOrTruncate(s: string, max: number, padding?: string) { @@ -76,7 +76,7 @@ export namespace Strings { export function padRight(s: string, padTo: number, padding: string = '\u00a0') { const diff = padTo - width(s); - return (diff <= 0) ? s : s + '\u00a0'.repeat(diff); + return (diff <= 0) ? s : s + padding.repeat(diff); } export function padOrTruncate(s: string, max: number, padding?: string) {