diff --git a/command.fnl b/command.fnl index 9eeb629..3396a21 100644 --- a/command.fnl +++ b/command.fnl @@ -47,14 +47,16 @@ #$1.buffer.name] [:url (fn [term] - (if (> (# term) 2) - (icollect [v (_G.history:find-distinct term)] - (let [label (.. v.url " " (or v.title ""))] - (completion { :text v.url - :widget (Gtk.Button { : label }) - :value v.url - }))) - [])) + (let [from-history + (if (> (# term) 2) + (icollect [v (_G.history:find-distinct term)] + (let [label (.. v.url " " (or v.title ""))] + (completion { :text v.url + :widget (Gtk.Button { : label }) + :value v.url + }))) + [])] + (lume.unique (lume.concat from-history [(completion {:text term})])))) #($1.buffer:location)] ] (fn [{:url url :buffer buffer}]