Skip to content

Commit 9f3d8cf

Browse files
rust format buffer now saves position across multiple frames (#348)
Fix #347.
1 parent d0f3f45 commit 9f3d8cf

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

rust-mode.el

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,16 +1557,17 @@ Return the created process."
15571557
(push (list buffer
15581558
(rust--format-get-loc buffer nil))
15591559
buffer-loc)))
1560-
(dolist (window (window-list))
1561-
(let ((buffer (window-buffer window)))
1562-
(when (or (eq buffer base)
1563-
(eq (buffer-base-buffer buffer) base))
1564-
(let ((start (window-start window))
1565-
(point (window-point window)))
1566-
(push (list window
1567-
(rust--format-get-loc buffer start)
1568-
(rust--format-get-loc buffer point))
1569-
window-loc)))))
1560+
(dolist (frame (frame-list))
1561+
(dolist (window (window-list frame))
1562+
(let ((buffer (window-buffer window)))
1563+
(when (or (eq buffer base)
1564+
(eq (buffer-base-buffer buffer) base))
1565+
(let ((start (window-start window))
1566+
(point (window-point window)))
1567+
(push (list window
1568+
(rust--format-get-loc buffer start)
1569+
(rust--format-get-loc buffer point))
1570+
window-loc))))))
15701571
(unwind-protect
15711572
(rust--format-call (current-buffer))
15721573
(dolist (loc buffer-loc)

0 commit comments

Comments
 (0)