From eefc187c9e01709f702e52bf6fe0397d7068bc83 Mon Sep 17 00:00:00 2001 From: "Andre A. Gomes" Date: Mon, 9 Oct 2023 21:29:21 +0300 Subject: [PATCH] Revert "buffer(switch-buffer): Add a source to create a new buffer." This reverts commit cc91712e5ed0d386e309e5e6c7a80a9249dfe788. Closes #3201. --- source/buffer.lisp | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/source/buffer.lisp b/source/buffer.lisp index 56ed3dabee5..d3c618ee3ca 100644 --- a/source/buffer.lisp +++ b/source/buffer.lisp @@ -1469,24 +1469,9 @@ second latest buffer first." (set-current-buffer buffer) (prompt :prompt "Switch to buffer" - :sources (list - (make-instance 'buffer-source - :constructor (buffer-initial-suggestions - :current-is-last-p current-is-last-p)) - (make-instance - 'new-url-or-search-source - :name "Create new buffer" - :actions-on-return (list (lambda-command new-buffer-load* (suggestion-values) - "Load URL(s) in new buffer(s)" - (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) - (rest suggestion-values)) - (make-buffer-focus :url (url (first suggestion-values)))) - (lambda-command new-nosave-buffer-load* (suggestion-values) - "Load URL(s) in new nosave buffer(s)" - (mapc (lambda (suggestion) (make-nosave-buffer :url (url suggestion))) - (rest suggestion-values)) - (make-buffer-focus :url (url (first suggestion-values)) - :nosave-buffer-p t)))))))) + :sources (make-instance 'buffer-source + :constructor (buffer-initial-suggestions + :current-is-last-p current-is-last-p))))) (define-command switch-buffer-domain (&key domain (buffer (current-buffer))) "Switch the active buffer in the current window from the current domain." @@ -1874,18 +1859,11 @@ specified for their contents." (if explicit-url-p (make-buffer-focus :url (url url)) (let ((history (set-url-history *browser*)) - (actions-on-return - (list (lambda-command new-buffer-load (suggestion-values) - "Load URL(s) in new buffer(s)" - (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) - (rest suggestion-values)) - (make-buffer-focus :url (url (first suggestion-values)))) - (lambda-command new-nosave-buffer-load (suggestion-values) - "Load URL(s) in new nosave buffer(s)" - (mapc (lambda (suggestion) (make-nosave-buffer :url (url suggestion))) - (rest suggestion-values)) - (make-buffer-focus :url (url (first suggestion-values)) - :nosave-buffer-p t))))) + (actions-on-return (lambda-command new-buffer-load (suggestion-values) + "Load URL(s) in new buffer(s)" + (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) + (rest suggestion-values)) + (make-buffer-focus :url (url (first suggestion-values)))))) (pushnew-url-history history (url (current-buffer))) (prompt :prompt "Open URL in new buffer"