Fix crash in readerhighlight (#8396)

reviewable/pr8395/r1^2
zwim 3 years ago committed by GitHub
parent bfddf710d6
commit 7887c9b1cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save