This commit is contained in:
Henning Dieterichs 2022-09-30 15:46:17 +02:00
parent 9fb452c485
commit f1789f1e30
No known key found for this signature in database
GPG key ID: 771381EFFDB9EC06

View file

@ -320,6 +320,15 @@ class ActionsContentWidget extends Disposable implements IContentWidget {
}
getPosition(): IContentWidgetPosition | null {
// We cannot put the content widget after line 0, as line 0 gets normalized to line 1.
// Thus, we put the content widget before line 1 to make it slightly less buggy.
// TODO: Fix this properly.
if (this.lineNumber === 0) {
return {
position: { lineNumber: 1, column: 1, },
preference: [ContentWidgetPositionPreference.ABOVE],
};
}
return {
position: { lineNumber: this.lineNumber, column: 1, },
preference: [ContentWidgetPositionPreference.BELOW],