branch: elpa/rust-mode
commit a90730f12eac21f4cd92319f229cef2a1221d290
Author: brotzeit <[email protected]>
Commit: brotzeit <[email protected]>

    don't set-window-start for selected window
---
 rust-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust-mode.el b/rust-mode.el
index 72109e5..204e210 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1475,7 +1475,8 @@ This is written mainly to be used as 
`end-of-defun-function' for Rust."
                (buffer (window-buffer window))
                (start (rust--format-get-pos buffer (pop loc)))
                (pos (rust--format-get-pos buffer (pop loc))))
-          (set-window-start window start)
+          (unless (eq buffer current)
+            (set-window-start window start))
           (set-window-point window pos)))))
 
   (message "Formatted buffer with rustfmt."))

Reply via email to