Fix selection in dictionary window (#2126)

Fix #2126 (hold on a word on the 2nd page of a definition was triggering
lookup of the word at the same place in 1st page).
pull/2390/head
poire-z 8 years ago committed by Qingping Hou
parent ba1b9cf6c5
commit 4ec7efb2d0

@ -292,7 +292,7 @@ function TextBoxWidget:onHoldWord(callback, ges)
if not callback then return end
local x, y = ges.pos.x - self.dimen.x, ges.pos.y - self.dimen.y
local line_num = math.ceil(y / self.line_height_px)
local line_num = math.ceil(y / self.line_height_px) + self.virtual_line_num-1
local line = self.vertical_string_list[line_num]
DEBUG("holding on line", line)
if line then

Loading…
Cancel
Save