fix #2060 by handling blank search pattern

This commit is contained in:
chrox
2016-06-15 02:34:46 +08:00
parent 22d0dbfb4f
commit 5bbcae954e
2 changed files with 3 additions and 0 deletions

View File

@@ -75,6 +75,8 @@ function ReaderSearch:onShowSearchDialog(text)
end
function ReaderSearch:search(pattern, origin)
DEBUG("search pattern", pattern)
if pattern == nil or pattern == '' then return end
local direction = self.direction
local case = self.case_insensitive
local page = self.view.state.page