Skip to content

Commit df3a0ae

Browse files
committed
[show-hint addon] Fix selected-option background size for scrolling widget
1 parent 352e34c commit df3a0ae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

addon/hint/show-hint.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
background: white;
1717
font-size: 90%;
1818
font-family: monospace;
19+
max-width: 19em;
1920

2021
max-height: 20em;
2122
overflow-y: auto;
@@ -25,7 +26,6 @@
2526
margin: 0;
2627
padding: 0 4px;
2728
border-radius: 2px;
28-
max-width: 19em;
2929
white-space: pre;
3030
color: black;
3131
cursor: pointer;

addon/hint/show-hint.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@
254254
}
255255
hints.style.left = (left = pos.left - overlapX) + "px";
256256
}
257-
if (scrolls) hints.style.paddingRight = cm.display.nativeBarWidth + "px"
257+
if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
258+
node.style.paddingRight = cm.display.nativeBarWidth + "px"
258259

259260
cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
260261
moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },

0 commit comments

Comments
 (0)