diff options
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
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.")) |
