Skip to content

Commit

Permalink
Improve hints support for CodeMirror
Browse files Browse the repository at this point in the history
On https://gcc.godbolt.org/ the `<textarea>` that needs a hint is 0px
wide instead of the usual 1px.
  • Loading branch information
lydell committed Aug 27, 2016
1 parent 03fa668 commit 62f2f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/lib/commands-frame.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ helper_follow = (options, matcher, {vim, pass}) ->
rect = element.getBoundingClientRect()
# Use `.clientWidth` instead of `rect.width` because the latter includes
# the width of the borders of the textarea, which are unreliable.
if element.clientWidth == 1 and rect.height > 0
if element.clientWidth <= 1 and rect.height > 0
shape = {
nonCoveredPoint: {
x: rect.left
Expand Down

0 comments on commit 62f2f03

Please sign in to comment.