diff --git a/base b/base index 656dbec1c..6a2c36b6a 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 656dbec1cffaf1a6f40c9decd49a585444aff129 +Subproject commit 6a2c36b6a0a645e34c889a9f7ea453b9c1aa9fa9 diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index 41cbc4ec5..282cc826d 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -716,6 +716,10 @@ function CreDocument:getScreenBoxesFromPositions(pos0, pos1, get_segments) return line_boxes end +function CreDocument:getNearestWordFromPosition(pos, direction) + return self._document:getNearestWordFromPosition(pos.x, pos.y, direction) +end + function CreDocument:compareXPointers(xp1, xp2) -- Returns 1 if XPointers are ordered (if xp2 is after xp1), -1 if not, 0 if same -- Returns nil if any of XPointers are invalid @@ -1894,6 +1898,7 @@ function CreDocument:setupCallCache() elseif name == "getPageLinks" then cache_by_tag = true elseif name == "getScreenBoxesFromPositions" then cache_by_tag = true elseif name == "getScreenPositionFromXPointer" then cache_by_tag = true + elseif name == "getNearestWordFromPosition" then cache_by_tag = true elseif name == "getXPointer" then cache_by_tag = true elseif name == "isXPointerInCurrentPage" then cache_by_tag = true elseif name == "getPageMapCurrentPageLabel" then cache_by_tag = true