mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fixes #208819
This commit is contained in:
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`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue