mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix crash in readerhighlight (#8396)
This commit is contained in:
@@ -179,7 +179,8 @@ function ReaderHighlight:init()
|
||||
return {
|
||||
text= _("Hyphenate"),
|
||||
show_in_highlight_dialog_func = function()
|
||||
return _self.ui.userhyph and _self.ui.userhyph:isAvailable() and not _self.selected_text.text:find("[ ,;-%.\n]")
|
||||
return _self.ui.userhyph and _self.ui.userhyph:isAvailable()
|
||||
and not _self.selected_text.text:find("[ ,;-%.\n]")
|
||||
end,
|
||||
callback = function()
|
||||
_self.ui.userhyph:modifyUserEntry(_self.selected_text.text)
|
||||
@@ -746,6 +747,10 @@ function ReaderHighlight:removeFromHighlightDialog(idx)
|
||||
end
|
||||
|
||||
function ReaderHighlight:onShowHighlightMenu()
|
||||
if not self.selected_text then
|
||||
return
|
||||
end
|
||||
|
||||
local highlight_buttons = {{}}
|
||||
|
||||
local columns = 2
|
||||
|
||||
Reference in New Issue
Block a user