Skip to content
Snippets Groups Projects
Commit eabba639 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[annotatescrollbar addon] Use slow/precise path when getting coords in lines with widgets

Closes #4554
parent c192f392
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,8 @@
curLine = pos.line;
curLineObj = cm.getLineHandle(curLine);
}
if (wrapping && curLineObj.height > singleLineH)
if ((curLineObj.widgets && curLineObj.widgets.length) ||
(wrapping && curLineObj.height > singleLineH))
return cm.charCoords(pos, "local")[top ? "top" : "bottom"];
var topY = cm.heightAtLine(curLineObj, "local");
return topY + (top ? 0 : curLineObj.height);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment