Merge pull request #2083 from chrox/fix_2060

fix #2060 by handling blank search pattern
This commit is contained in:
Qingping Hou
2016-06-15 00:25:40 -07:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -1090,6 +1090,7 @@ local function all_matches(boxes, pattern, caseInsensitive)
local function match(i, j)
local pindex = 1
local matched_indices = {}
if #plist == 0 then return end
while true do
if #boxes[i] < j then
j = j - #boxes[i]