Skip to content

Commit

Permalink
[show-hint addon] Fix selected-option background size for scrolling w…
Browse files Browse the repository at this point in the history
…idget
  • Loading branch information
marijnh committed May 26, 2016
1 parent 352e34c commit df3a0ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/hint/show-hint.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
background: white;
font-size: 90%;
font-family: monospace;
max-width: 19em;

max-height: 20em;
overflow-y: auto;
Expand All @@ -25,7 +26,6 @@
margin: 0;
padding: 0 4px;
border-radius: 2px;
max-width: 19em;
white-space: pre;
color: black;
cursor: pointer;
Expand Down
3 changes: 2 additions & 1 deletion addon/hint/show-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@
}
hints.style.left = (left = pos.left - overlapX) + "px";
}
if (scrolls) hints.style.paddingRight = cm.display.nativeBarWidth + "px"
if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
node.style.paddingRight = cm.display.nativeBarWidth + "px"

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

0 comments on commit df3a0ae

Please sign in to comment.