emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 9f3d8cf 432/486: rust format buffer now saves po


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 9f3d8cf 432/486: rust format buffer now saves position across multiple frames (#348)
Date: Sat, 7 Aug 2021 09:26:08 -0400 (EDT)

branch: elpa/rust-mode
commit 9f3d8cfbd5a454b2096d481970bc6e121f626341
Author: ryanswilson59 <34287974+ryanswilson59@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    rust format buffer now saves position across multiple frames (#348)
    
    Fix #347.
---
 rust-mode.el | 21 +++++++++++----------
 1 file 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]