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