File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/vs/editor/browser/widget/multiDiffEditorWidget Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,8 @@ export class DiffEditorItemTemplate extends Disposable implements IPooledObject<
230
230
this . _elements . root . style . position = 'absolute' ;
231
231
232
232
// For sticky scroll
233
- const delta = Math . max ( 0 , Math . min ( verticalRange . length - this . _headerHeight , viewPort . start - verticalRange . start ) ) ;
233
+ const maxDelta = verticalRange . length - this . _headerHeight ;
234
+ const delta = Math . max ( 0 , Math . min ( viewPort . start - verticalRange . start , maxDelta ) ) ;
234
235
this . _elements . header . style . transform = `translateY(${ delta } px)` ;
235
236
236
237
globalTransaction ( tx => {
@@ -242,6 +243,7 @@ export class DiffEditorItemTemplate extends Disposable implements IPooledObject<
242
243
this . editor . getOriginalEditor ( ) . setScrollTop ( editorScroll ) ;
243
244
244
245
this . _elements . header . classList . toggle ( 'shadow' , delta > 0 || editorScroll > 0 ) ;
246
+ this . _elements . header . classList . toggle ( 'collapsed' , delta === maxDelta ) ;
245
247
}
246
248
247
249
public hide ( ) : void {
Original file line number Diff line number Diff line change 7
7
background : var (--vscode-multiDiffEditor-background );
8
8
overflow-y : hidden;
9
9
10
+ .focused {
11
+ --vscode-multiDiffEditor-border : var (--vscode-focusBorder );
12
+ }
13
+
10
14
.multiDiffEntry {
11
15
display : flex;
12
16
flex-direction : column;
27
31
z-index : 1000 ;
28
32
background : var (--vscode-editor-background );
29
33
34
+ & : not (.collapsed ) .header-content {
35
+ border-bottom : 1px solid var (--vscode-sideBarSectionHeader-border );
36
+ }
37
+
30
38
.header-content {
31
39
margin : 8px 8px 0px 8px ;
32
40
padding : 8px 5px ;
43
51
color : var (--vscode-foreground );
44
52
background : var (--vscode-multiDiffEditor-headerBackground );
45
53
46
- border-bottom : 1px solid var (--vscode-sideBarSectionHeader-border );
47
-
48
54
& .shadow {
49
55
box-shadow : var (--vscode-scrollbar-shadow ) 0px 6px 6px -6px ;
50
56
}
You can’t perform that action at this time.
0 commit comments