Stops trying to set the line if we don't have one

This commit is contained in:
Eric Amodio
2017-06-14 02:01:24 -04:00
parent 1cdd94cb46
commit a306ba2b98
5 changed files with 17 additions and 2 deletions

View File

@@ -79,6 +79,8 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
`${path.basename(args.commit.uri.fsPath)} (${args.commit.shortSha}) ${GlyphChars.ArrowLeftRight} ${path.basename(gitUri.fsPath)} (${gitUri.shortSha})`,
args.showOptions);
if (args.line === undefined || args.line === 0) return undefined;
// TODO: Figure out how to focus the left pane
return await commands.executeCommand(BuiltInCommands.RevealLine, { lineNumber: args.line, at: 'center' });
}