mirror of https://codeberg.org/cage/tinmop/
- added bookmarked URLs to the list of candidates for autocompletion.
This commit is contained in:
parent
312c18fae8
commit
a7d7aa8555
|
@ -242,14 +242,14 @@ list af all possible candidtae for completion."
|
|||
(let ((actual-hint (maybe-remove-file-scheme hint)))
|
||||
(if (expand-iri-as-local-path-p actual-hint)
|
||||
(directory-complete actual-hint)
|
||||
(when-let ((bag (remove-duplicates (funcall #'db:history-prompt->values
|
||||
prompt)
|
||||
(when-let ((bag (remove-duplicates (nconc (db:history-prompt->values prompt)
|
||||
(db:bookmark-all-bookmarked-url))
|
||||
:test #'string=)))
|
||||
(multiple-value-bind (matched-strings indices)
|
||||
(uri-matcher actual-hint bag)
|
||||
(when matched-strings
|
||||
(values matched-strings
|
||||
nil ;for fuzzy search common prefix does
|
||||
nil ;for fuzzy search common prefix does
|
||||
;not makes sense; note also that
|
||||
;setting this to nil will force
|
||||
;selecting the first item in
|
||||
|
|
|
@ -3280,6 +3280,11 @@ days in the past"
|
|||
(query (select :* (from +table-bookmark+) (where (:is-null :section))))
|
||||
(query (select :* (from +table-bookmark+) (where (:= :section section))))))
|
||||
|
||||
(defun bookmark-all-bookmarked-url ()
|
||||
(remove-if-not (lambda (a) (iri:iri-parse a :null-on-error t))
|
||||
(mapcar #'second
|
||||
(query (select :value (from +table-bookmark+))))))
|
||||
|
||||
(defun bookmark-all ()
|
||||
(query (select :* (from +table-bookmark+))))
|
||||
|
||||
|
|
|
@ -1134,6 +1134,7 @@
|
|||
:bookmark-description-for-complete
|
||||
:bookmark-all-sections
|
||||
:bookmark-all-grouped-by-section
|
||||
:bookmark-all-bookmarked-url
|
||||
:bookmark-all
|
||||
:bookmark-exists-p
|
||||
:bookmark-delete
|
||||
|
|
Loading…
Reference in New Issue