mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
@@ -844,7 +844,10 @@ function Menu:onGotoPage(page)
|
||||
end
|
||||
|
||||
function Menu:onSelect()
|
||||
self:onMenuSelect(self.item_table[(self.page-1)*self.perpage+self.selected.y])
|
||||
local item = self.item_table[(self.page-1)*self.perpage+self.selected.y]
|
||||
if item then
|
||||
self:onMenuSelect(item)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ function TextBoxWidget:_splitCharWidthList()
|
||||
local adjusted_width = cur_line_width
|
||||
repeat
|
||||
adjusted_width = adjusted_width - self.char_width_list[adjusted_idx].width
|
||||
if adjusted_idx == 1 then break end
|
||||
adjusted_idx = adjusted_idx - 1
|
||||
c = self.char_width_list[adjusted_idx].char
|
||||
until adjusted_idx > offset and util.isSplitable(c)
|
||||
@@ -134,6 +135,7 @@ function TextBoxWidget:_splitCharWidthList()
|
||||
end
|
||||
end -- endif util.isSplitable(c)
|
||||
end -- endif cur_line_width > self.width
|
||||
if cur_line_width < 0 then break end
|
||||
self.vertical_string_list[ln] = {
|
||||
text = cur_line_text,
|
||||
offset = offset,
|
||||
|
||||
Reference in New Issue
Block a user