From 7786ec2905ffbe2f552e37a2560db214ec1c3843 Mon Sep 17 00:00:00 2001 From: Commodore64user <97603719+Commodore64user@users.noreply.github.com> Date: Mon, 24 Aug 2026 17:18:05 +0100 Subject: [PATCH] ReaderKeySelection: get correct coordinates from hyphenated words --- frontend/apps/reader/modules/readerkeyselection.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/apps/reader/modules/readerkeyselection.lua b/frontend/apps/reader/modules/readerkeyselection.lua index 4fcdc9f15..0c4eb07dd 100644 --- a/frontend/apps/reader/modules/readerkeyselection.lua +++ b/frontend/apps/reader/modules/readerkeyselection.lua @@ -435,9 +435,9 @@ function ReaderKeySelection:startHighlightIndicator() local nearest_word = self:_getNearestWordFromScreenPoint(center_x, center_y) if nearest_word then self:_setIndicatorToWord(nearest_word) - -- Flash nearest_word in case the crosshairs if hard to find. - local coor = nearest_word.sbox - if self.ui.highlight:highlightWordAtCoordinates(coor.x + coor.w * 0.5, coor.y + coor.h * 0.5) then + -- Flash nearest_word in case the crosshairs are hard to find. + local anchor_x, anchor_y = self:_getWordAnchorCoordinates(nearest_word) + if self.ui.highlight:highlightWordAtCoordinates(anchor_x, anchor_y) then self._flashing_nearest_word = true UIManager:scheduleIn(G_defaults:readSetting("DELAY_CLEAR_HIGHLIGHT_S"), function() self:clearFlashHighlight()