`findreplace`: Sort last searches

This commit is contained in:
Guldoman 2022-06-23 05:14:37 +02:00
parent beefb16469
commit ec0e3018a8
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
1 changed files with 5 additions and 2 deletions

View File

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