From f21b201b17bfe25e6dc1e2cc53e9a773947218f7 Mon Sep 17 00:00:00 2001 From: cage Date: Fri, 23 Feb 2024 13:50:21 +0100 Subject: [PATCH] - instructed address bar to autoselect a candidate only when expanding local paths (not URLs). --- src/gui/client/main-window.lisp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index 63caa1d..f146933 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -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)