]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix xref--next-error-function behavior WRT current buffer
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 28 Feb 2018 01:38:37 +0000 (03:38 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 28 Feb 2018 02:04:29 +0000 (04:04 +0200)
* lisp/progmodes/xref.el (xref--show-location): Make sure to
make the target window selected at the end, and its buffer
current (bug#20489).

lisp/progmodes/xref.el

index e0f5b2d36701afc0c185b45fd9d68bc649c2c8b5..1c1fc597c50a63ecb44e736071a9d170a0782816 100644 (file)
@@ -501,8 +501,9 @@ SELECT is `quit', also quit the *xref* window."
              (xref-buffer (current-buffer)))
         (cond (select
                (if (eq select 'quit) (quit-window nil nil))
-               (with-current-buffer xref-buffer
-                 (select-window (xref--show-pos-in-buf marker buf))))
+               (select-window
+                (with-current-buffer xref-buffer
+                  (xref--show-pos-in-buf marker buf))))
               (t
                (save-selected-window
                  (xref--with-dedicated-window