diff options
| author | brotzeit <brotzeitmacher@gmail.com> | 2017-11-24 16:21:13 +0100 |
|---|---|---|
| committer | brotzeit <brotzeitmacher@gmail.com> | 2017-11-24 16:21:13 +0100 |
| commit | a90730f12eac21f4cd92319f229cef2a1221d290 (patch) | |
| tree | a73027adba73e0d9b594bcddf11ddc2ca4a8d143 | |
| parent | 7ff04a8d26104c2e2c0737e219b320ecaeaafd9d (diff) | |
| download | rust-mode-a90730f12eac21f4cd92319f229cef2a1221d290.tar.gz | |
don't set-window-start for selected window
| -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.")) |
