1
0
Fork 0

- instructed address bar to autoselect a candidate only when expanding local paths (not URLs).

This commit is contained in:
cage 2024-02-23 13:50:21 +01:00
parent e23ca2c131
commit f21b201b17
1 changed files with 12 additions and 10 deletions

View File

@ -315,16 +315,18 @@
(defun autocomplete-iri-clsr (toolbar)
(declare (ignore toolbar))
(lambda (hint)
(if (or (complete:expand-iri-as-local-path-p hint)
(> (length hint) 2))
(gui-goodies:with-notify-errors
(let ((match-results (cev:enqueue-request-and-wait-results :complete-net-address
1
ev:+maximum-event-priority+
hint)))
(values (getf match-results :matches)
(getf match-results :indices))))
hint)))
(let ((expand-as-local-path (complete:expand-iri-as-local-path-p hint)))
(if (or expand-as-local-path
(> (length hint) 2))
(gui-goodies:with-notify-errors
(let ((match-results (cev:enqueue-request-and-wait-results :complete-net-address
1
ev:+maximum-event-priority+
hint)))
(values (getf match-results :matches)
(getf match-results :indices)
expand-as-local-path)))
hint))))
(defmacro gen-ir-access (key)
`(defun ,(misc:format-fn-symbol t "ir-~a" key) (line)