File tree Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,15 @@ export class DiffWithNextCommand extends ActiveEditorCommand {
36
36
37
37
let isInLeftSideOfDiffEditor = false ;
38
38
39
- // Figure out if we are in a diff editor and if so, which side
40
- const [ tab ] = getVisibleTabs ( uri ) ;
41
- if ( tab != null ) {
42
- const uris = getTabUris ( tab ) ;
43
- // If there is an original, then we are in a diff editor -- modified is right, original is left
44
- if ( uris . original != null && uriEquals ( uri , uris . original ) ) {
45
- isInLeftSideOfDiffEditor = true ;
39
+ if ( args . commit == null ) {
40
+ // Figure out if we are in a diff editor and if so, which side
41
+ const [ tab ] = getVisibleTabs ( uri ) ;
42
+ if ( tab != null ) {
43
+ const uris = getTabUris ( tab ) ;
44
+ // If there is an original, then we are in a diff editor -- modified is right, original is left
45
+ if ( uris . original != null && uriEquals ( uri , uris . original ) ) {
46
+ isInLeftSideOfDiffEditor = true ;
47
+ }
46
48
}
47
49
}
48
50
Original file line number Diff line number Diff line change @@ -74,15 +74,17 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
74
74
let isInRightSideOfDiffEditor = false ;
75
75
let isDirty = false ;
76
76
77
- // Figure out if we are in a diff editor and if so, which side
78
- const [ tab ] = getVisibleTabs ( uri ) ;
79
- if ( tab != null ) {
80
- isDirty = tab . isDirty ;
81
-
82
- const uris = getTabUris ( tab ) ;
83
- // If there is an original, then we are in a diff editor -- modified is right, original is left
84
- if ( uris . original != null && uriEquals ( uri , uris . modified ) ) {
85
- isInRightSideOfDiffEditor = true ;
77
+ if ( args . commit == null ) {
78
+ // Figure out if we are in a diff editor and if so, which side
79
+ const [ tab ] = getVisibleTabs ( uri ) ;
80
+ if ( tab != null ) {
81
+ isDirty = tab . isDirty ;
82
+
83
+ const uris = getTabUris ( tab ) ;
84
+ // If there is an original, then we are in a diff editor -- modified is right, original is left
85
+ if ( uris . original != null && uriEquals ( uri , uris . modified ) ) {
86
+ isInRightSideOfDiffEditor = true ;
87
+ }
86
88
}
87
89
}
88
90
You can’t perform that action at this time.
0 commit comments