Skip to content

Commit 4fb9916

Browse files
committed
Work around issue in coordsChar in wrapped bidi lines
1 parent 0968398 commit 4fb9916

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/measurement/position_measurement.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x,
559559
// wrapped line, and then do a flat search in which we discard any
560560
// spans that aren't on the line.
561561
let {begin, end} = wrappedLineExtent(cm, lineObj, preparedMeasure, y)
562+
if (/\s/.test(lineObj.text.charAt(end - 1))) end--
562563
let part = null, closestDist = null
563564
for (let i = 0; i < order.length; i++) {
564565
let p = order[i]

0 commit comments

Comments
 (0)