diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 4cedf82453f0f56a8be17839d2dc64a88287481a..eaa6e742263a85318cb605a9c942c6117f4e31df 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -213,7 +213,11 @@ class DirtyDiffWidget extends PeekViewWidget { this.diffEditor.setModel(this.model); const position = new Position(getModifiedEndLineNumber(change), 1); - const height = getChangeHeight(change) + /* padding */ 8; + + const lineHeight = this.editor.getConfiguration().lineHeight; + const editorHeight = this.editor.getLayoutInfo().height; + const editorHeightInLines = Math.floor(editorHeight / lineHeight); + const height = Math.min(getChangeHeight(change) + /* padding */ 8, Math.floor(editorHeightInLines / 3)); this.renderTitle();