Skip to content

Commit

Permalink
Revert "buffer(switch-buffer): Add a source to create a new buffer."
Browse files Browse the repository at this point in the history
This reverts commit cc91712.

Closes #3201.
  • Loading branch information
aadcg committed Oct 9, 2023
1 parent 76a9e0d commit eefc187
Showing 1 changed file with 8 additions and 30 deletions.
38 changes: 8 additions & 30 deletions source/buffer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit eefc187

Please sign in to comment.