11'use strict' ;
22import { Iterables } from '../system' ;
3- import { commands , Range , TextDocumentShowOptions , TextEditor , Uri , window } from 'vscode' ;
3+ import { commands , TextDocumentShowOptions , TextEditor , Uri , window } from 'vscode' ;
44import { ActiveEditorCommand , Commands , getCommandUri } from './common' ;
55import { Container } from '../container' ;
66import { DiffWithCommandArgs } from './diffWith' ;
@@ -11,7 +11,6 @@ import { Messages } from '../messages';
1111
1212export interface DiffWithPreviousCommandArgs {
1313 commit ?: GitCommit ;
14- range ?: Range ;
1514
1615 line ?: number ;
1716 showOptions ?: TextDocumentShowOptions ;
@@ -32,7 +31,7 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
3231 args . line = editor === undefined ? 0 : editor . selection . active . line ;
3332 }
3433
35- if ( args . commit === undefined || ! args . commit . isFile || args . range !== undefined ) {
34+ if ( args . commit === undefined || ! args . commit . isFile ) {
3635 const gitUri = await GitUri . fromUri ( uri ) ;
3736
3837 try {
@@ -46,7 +45,7 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
4645 isStagedUncommitted = true ;
4746 }
4847
49- const log = await Container . git . getLogForFile ( gitUri . repoPath , gitUri . fsPath , { maxCount : 2 , range : args . range ! , ref : sha , skipMerges : true } ) ;
48+ const log = await Container . git . getLogForFile ( gitUri . repoPath , gitUri . fsPath , { maxCount : 2 , ref : sha , skipMerges : true } ) ;
5049 if ( log === undefined ) return Messages . showFileNotUnderSourceControlWarningMessage ( 'Unable to open compare' ) ;
5150
5251 args . commit = ( sha && log . commits . get ( sha ) ) || Iterables . first ( log . commits . values ( ) ) ;
0 commit comments