mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-08 06:49:37 +01:00
Fixes #208819
This commit is contained in:
committed by
Henning Dieterichs
parent
17e86debf7
commit
3e41bfbe49
@@ -118,10 +118,12 @@ export class EditorGutter<T extends IGutterItemInfo = IGutterItemInfo> extends D
|
||||
gutterItem.range.startLineNumber <= this._editor.getModel()!.getLineCount()
|
||||
? this._editor.getTopForLineNumber(gutterItem.range.startLineNumber, true) - scrollTop
|
||||
: this._editor.getBottomForLineNumber(gutterItem.range.startLineNumber - 1, false) - scrollTop;
|
||||
const bottom = this._editor.getBottomForLineNumber(gutterItem.range.endLineNumberExclusive - 1, true) - scrollTop;
|
||||
const bottom = gutterItem.range.isEmpty
|
||||
// Don't trust that `getBottomForLineNumber` for the previous line equals `getTopForLineNumber` for the current one.
|
||||
? top
|
||||
: (this._editor.getBottomForLineNumber(gutterItem.range.endLineNumberExclusive - 1, true) - scrollTop);
|
||||
|
||||
const height = bottom - top;
|
||||
|
||||
view.domNode.style.top = `${top}px`;
|
||||
view.domNode.style.height = `${height}px`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user