diff options
Diffstat (limited to 'lisp/iswitchb.el')
| -rw-r--r-- | lisp/iswitchb.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 802b45d23b1..8a800143bd2 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -657,9 +657,12 @@ the selection process begins. Used by isearchb.el." ;; that file now and act as though that buffer had been selected. (if (and iswitchb-virtual-buffers (not (iswitchb-existing-buffer-p))) - (let ((virt (car iswitchb-virtual-buffers))) - (find-file-noselect (cdr virt)) - (setq iswitchb-matches (list (car virt)) + (let ((virt (car iswitchb-virtual-buffers)) + (new-buf)) + ;; Keep the name of the buffer returned by find-file-noselect, as + ;; the buffer 'virt' could be a symlink to a file of a different name. + (setq new-buf (buffer-name (find-file-noselect (cdr virt)))) + (setq iswitchb-matches (list new-buf) iswitchb-virtual-buffers nil))) ;; Handling the require-match must be done in a better way. |
