diff options
| author | ryanswilson59 <34287974+ryanswilson59@users.noreply.github.com> | 2020-01-28 16:16:36 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-29 01:16:36 +0100 |
| commit | 9f3d8cfbd5a454b2096d481970bc6e121f626341 (patch) | |
| tree | 0bbff24ab79007f35a776844e5866bccfe8b3f93 /rust-mode.el | |
| parent | d0f3f45cc4fe1c5b72466253f051294d275a4b64 (diff) | |
| download | rust-mode-9f3d8cfbd5a454b2096d481970bc6e121f626341.tar.gz | |
rust format buffer now saves position across multiple frames (#348)
Fix #347.
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/rust-mode.el b/rust-mode.el index 92f7daa..3d50c2e 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -1557,16 +1557,17 @@ Return the created process." (push (list buffer (rust--format-get-loc buffer nil)) buffer-loc))) - (dolist (window (window-list)) - (let ((buffer (window-buffer window))) - (when (or (eq buffer base) - (eq (buffer-base-buffer buffer) base)) - (let ((start (window-start window)) - (point (window-point window))) - (push (list window - (rust--format-get-loc buffer start) - (rust--format-get-loc buffer point)) - window-loc))))) + (dolist (frame (frame-list)) + (dolist (window (window-list frame)) + (let ((buffer (window-buffer window))) + (when (or (eq buffer base) + (eq (buffer-base-buffer buffer) base)) + (let ((start (window-start window)) + (point (window-point window))) + (push (list window + (rust--format-get-loc buffer start) + (rust--format-get-loc buffer point)) + window-loc)))))) (unwind-protect (rust--format-call (current-buffer)) (dolist (loc buffer-loc) |
