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 *************/
|
||||
.CodeMirror-linewidget .applies-to {
|
||||
margin: 1em 0;
|
||||
padding: .75rem .75rem .25rem;
|
||||
padding-right: calc(1em + 20px);
|
||||
padding: .75rem calc(.25rem + var(--cm-bar-width, 0)) .25rem .75rem;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget .applies-to li {
|
||||
|
|
|
@ -286,6 +286,13 @@ function MozSectionWidget(cm, finder = MozSectionFinder(cm)) {
|
|||
above: true,
|
||||
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) {
|
||||
funcHeight = node.offsetHeight / (sec.funcs.length || 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user