readerhighlight: stop highlighting when sboxes are absent
This commit is contained in:
1 parent
a7fca869f2
commit
fbfb993c6b
1 file changed
+4
@@ -1853,6 +1853,10 @@ function ReaderHighlight:onHoldPan(_, ges)
|
||||
|
||||
local old_text = self.selected_text and self.selected_text.text
|
||||
self.selected_text = self.ui.document:getTextFromPositions(self.hold_pos, self.holdpan_pos)
|
||||
if self.selected_text and self.selected_text.sboxes and #self.selected_text.sboxes == 0 then
|
||||
self:clear()
|
||||
return true
|
||||
end
|
||||
self.is_word_selection = false
|
||||
|
||||
if self.selected_text and self.selected_text.pos0 then
|
||||
|
||||
Reference in new issue
Block a user