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<
230230 this . _elements . root . style . position = 'absolute' ;
231231
232232 // 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 ) ) ;
234235 this . _elements . header . style . transform = `translateY(${ delta } px)` ;
235236
236237 globalTransaction ( tx => {
@@ -242,6 +243,7 @@ export class DiffEditorItemTemplate extends Disposable implements IPooledObject<
242243 this . editor . getOriginalEditor ( ) . setScrollTop ( editorScroll ) ;
243244
244245 this . _elements . header . classList . toggle ( 'shadow' , delta > 0 || editorScroll > 0 ) ;
246+ this . _elements . header . classList . toggle ( 'collapsed' , delta === maxDelta ) ;
245247 }
246248
247249 public hide ( ) : void {
Original file line number Diff line number Diff line change 77 background : var (--vscode-multiDiffEditor-background );
88 overflow-y : hidden;
99
10+ .focused {
11+ --vscode-multiDiffEditor-border : var (--vscode-focusBorder );
12+ }
13+
1014 .multiDiffEntry {
1115 display : flex;
1216 flex-direction : column;
2731 z-index : 1000 ;
2832 background : var (--vscode-editor-background );
2933
34+ & : not (.collapsed ) .header-content {
35+ border-bottom : 1px solid var (--vscode-sideBarSectionHeader-border );
36+ }
37+
3038 .header-content {
3139 margin : 8px 8px 0px 8px ;
3240 padding : 8px 5px ;
4351 color : var (--vscode-foreground );
4452 background : var (--vscode-multiDiffEditor-headerBackground );
4553
46- border-bottom : 1px solid var (--vscode-sideBarSectionHeader-border );
47-
4854 & .shadow {
4955 box-shadow : var (--vscode-scrollbar-shadow ) 0px 6px 6px -6px ;
5056 }
You can’t perform that action at this time.
0 commit comments