Browse files

Fix a bug in kill-buffer-hook: can't kill the last

When there is only one buffer remains in the history list, this buffer
cannot be killed and the message like the following will be shown:

    wlf:set-buffer: Buffer is null! at wlf:set-buffer. (left)

This change fix this problem.
  • Loading branch information...
1 parent b87646c commit 6d07ba26a51816f68fb93a8b3bab5ae13180f472 @tkf tkf committed with Apr 16, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 e2wm.el
@@ -1250,6 +1250,7 @@ Called via `kill-buffer-hook'."
(buffers (e2wm:history-get-nearest killedbuf (length wins))))
(loop for wname in wins
for buf in buffers
+ when buf
do (wlf:set-buffer wm wname buf))))
;; remove it from the history list
(e2wm:history-delete (current-buffer))

0 comments on commit 6d07ba2

Please sign in to comment.