`findreplace`: Sort last searches
This commit is contained in:
parent
beefb16469
commit
ec0e3018a8
|
@ -46,9 +46,12 @@ end
|
|||
local function insert_unique(t, v)
|
||||
local n = #t
|
||||
for i = 1, n do
|
||||
if t[i] == v then return end
|
||||
if t[i] == v then
|
||||
table.remove(t, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
t[n + 1] = v
|
||||
table.insert(t, 1, v)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue