properly account for scrollbar in applies-to widget
This commit is contained in:
parent
ebb5fcafbc
commit
23d86c53a7
|
@ -926,8 +926,7 @@ body.linter-disabled .hidden-unless-compact {
|
||||||
/************ line widget *************/
|
/************ line widget *************/
|
||||||
.CodeMirror-linewidget .applies-to {
|
.CodeMirror-linewidget .applies-to {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
padding: .75rem .75rem .25rem;
|
padding: .75rem calc(.25rem + var(--cm-bar-width, 0)) .25rem .75rem;
|
||||||
padding-right: calc(1em + 20px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror-linewidget .applies-to li {
|
.CodeMirror-linewidget .applies-to li {
|
||||||
|
|
|
@ -286,6 +286,13 @@ function MozSectionWidget(cm, finder = MozSectionFinder(cm)) {
|
||||||
above: true,
|
above: true,
|
||||||
height,
|
height,
|
||||||
});
|
});
|
||||||
|
widget.on('redraw', () => {
|
||||||
|
const value = cm.display.barWidth + 'px';
|
||||||
|
if (widget[KEY] !== value) {
|
||||||
|
widget[KEY] = value;
|
||||||
|
node.style.setProperty('--cm-bar-width', value);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (!funcHeight) {
|
if (!funcHeight) {
|
||||||
funcHeight = node.offsetHeight / (sec.funcs.length || 1);
|
funcHeight = node.offsetHeight / (sec.funcs.length || 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user