(eww-bookmark-browse): Don't bug out if it's the only window.

This commit is contained in:
Lars Magne Ingebrigtsen 2013-06-26 19:14:46 +02:00
parent a285ce999f
commit 47fd571be7
2 changed files with 5 additions and 1 deletions

View file

@ -6,6 +6,7 @@
(eww-add-bookmark): New command.
(eww-bookmark-mode): New mode and commands.
(eww-add-bookmark): Remove newlines from the title.
(eww-bookmark-browse): Don't bug out if it's the only window.
2013-06-26 Glenn Morris <rgm@gnu.org>

View file

@ -1043,7 +1043,10 @@ The browser to used is specified by the `shr-external-browser' variable."
(let ((bookmark (get-text-property (line-beginning-position) 'eww-bookmark)))
(unless bookmark
(error "No bookmark on the current line"))
(delete-window)
;; We wish to leave this window, but if it's the only window here,
;; just let it remain.
(ignore-errors
(delete-window))
(eww (plist-get bookmark :url))))
(defun eww-next-bookmark ()