diff options
author | Ivan Shmakov <ivan@siamics.net> | 2014-12-07 20:38:38 +0100 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2014-12-07 20:38:38 +0100 |
commit | b9ad615e658803846192340d18919f3c7ac9b94e (patch) | |
tree | b5e1873ca91e2b870bf16a7b6722c24cca805eb7 /lisp/net | |
parent | 2c3d1113927f19903a4909f010c9fe2a73a8f741 (diff) | |
download | emacs-b9ad615e658803846192340d18919f3c7ac9b94e.tar.gz emacs-b9ad615e658803846192340d18919f3c7ac9b94e.tar.bz2 emacs-b9ad615e658803846192340d18919f3c7ac9b94e.zip |
eww history restoration fix
Fixes: debbugs:18550
* net/eww.el (eww-list-histories): Restore the history in the
correct buffer.
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/eww.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c1ba4294905..f74f0eff38b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1584,9 +1584,11 @@ Differences in #targets are ignored." (interactive) (when (null eww-history) (error "No eww-histories are defined")) - (let ((eww-history-trans eww-history)) + (let ((eww-history-trans eww-history) + (buffer (current-buffer))) (set-buffer (get-buffer-create "*eww history*")) (eww-history-mode) + (setq-local eww-current-buffer buffer) (let ((inhibit-read-only t) (domain-length 0) (title-length 0) @@ -1615,7 +1617,10 @@ Differences in #targets are ignored." (let ((history (get-text-property (line-beginning-position) 'eww-history))) (unless history (error "No history on the current line")) - (quit-window) + (let ((buffer eww-current-buffer)) + (quit-window) + (when buffer + (switch-to-buffer buffer))) (eww-restore-history history))) (defvar eww-history-mode-map |