词典也会搜索词条标题

This commit is contained in:
MrZ626
2022-01-01 22:00:36 +08:00
parent 0f83ae0f1b
commit d3441628a9
3 changed files with 290 additions and 290 deletions

View File

@@ -61,7 +61,7 @@ local function _search()
_clearResult()
local first
for i=1,#dict do
local pos=find(dict[i].keywords,input,nil,true)
local pos=find(dict[i].title:lower(),input,nil,true)or find(dict[i].keywords,input,nil,true)
if pos==1 and not first then
ins(result,1,dict[i])
first=true