@@ -1283,27 +1283,26 @@ webui.DiffView = function(sideBySide, hunkSelectionAllowed, parent, stashedCommi
12831283 var self = this ;
12841284
12851285 self . update = function ( cmd , diffOpts , file , mode ) {
1286- console . log ( diffOpts ) ;
1287- console . log ( file ) ;
12881286 gitApplyType = mode ;
12891287 $ ( ".diff-stage" , self . element ) . attr ( "style" , "display:none" ) ;
12901288 $ ( ".diff-cancel" , self . element ) . attr ( "style" , "display:none" ) ;
12911289 $ ( ".diff-unstage" , self . element ) . attr ( "style" , "display:none" ) ;
12921290 if ( cmd ) {
12931291 self . gitCmd = cmd ;
12941292 self . gitDiffOpts = diffOpts ;
1295- if ( file != self . gitFile ) {
1296- // left.scrollTop = 0;
1297- // left.scrollLeft = 0;
1298- // right.scrollTop = 0;
1299- // right.scrollLeft = 0;
1300- // left.webuiPrevScrollTop = 0;
1301- // left.webuiPrevScrollLeft = 0;
1302- // right.webuiPrevScrollTop = 0;
1303- // right.webuiPrevScrollLeft = 0;
1304- }
1293+ // if (file != self.gitFile) {
1294+ // left.scrollTop = 0;
1295+ // left.scrollLeft = 0;
1296+ // right.scrollTop = 0;
1297+ // right.scrollLeft = 0;
1298+ // left.webuiPrevScrollTop = 0;
1299+ // left.webuiPrevScrollLeft = 0;
1300+ // right.webuiPrevScrollTop = 0;
1301+ // right.webuiPrevScrollLeft = 0;
1302+ // }
13051303 webui . git ( "ls-files \"" + file + "\"" , function ( path ) {
13061304 self . gitFile = "\"" + file + "\"" ;
1305+ console . log ( self . gitFile ) ;
13071306 self . noIndex = ""
13081307 if ( path . length == 0 && file != undefined ) {
13091308 self . gitFile = " /dev/null " + file ;
@@ -1325,7 +1324,7 @@ webui.DiffView = function(sideBySide, hunkSelectionAllowed, parent, stashedCommi
13251324 if ( self . gitDiffOpts ) {
13261325 fullCmd += " " + self . gitDiffOpts . join ( " " )
13271326 }
1328- if ( self . gitFile ) {
1327+ if ( self . gitFile && self . gitFile != '"undefined"' ) {
13291328 fullCmd += self . noIndex + " -- " + self . gitFile ;
13301329 }
13311330 webui . git ( fullCmd , self . refresh , self . refresh , self . refresh ) ;
0 commit comments