Highlight adjusting: avoid start and end crossing each other

This commit is contained in:
poire-z
2019-02-17 16:15:32 +01:00
parent e717d67896
commit 62d548fc61
2 changed files with 15 additions and 12 deletions

View File

@@ -306,6 +306,11 @@ function CreDocument:getScreenBoxesFromPositions(pos0, pos1, get_segments)
return line_boxes
end
function CreDocument:compareXPointers(xp1, xp2)
-- Returns 1 if XPointers are ordered (if xp2 is after xp1), -1 if not, 0 if same
return self._document:compareXPointers(xp1, xp2)
end
function CreDocument:getNextVisibleWordStart(xp)
return self._document:getNextVisibleWordStart(xp)
end