1
0
Fork 0

- added bookmarked URLs to the list of candidates for autocompletion.

This commit is contained in:
cage 2023-08-16 17:35:34 +02:00
parent 312c18fae8
commit a7d7aa8555
3 changed files with 9 additions and 3 deletions

View File

@ -242,8 +242,8 @@ 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)

View File

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

View File

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