branch: elpa/rust-mode
commit 7fd78f0f4f0fb5de927e07dd3b115569fce79fb0
Author: Nathan Moreau <[email protected]>
Commit: Nathan Moreau <[email protected]>
rust-goto-format-problem: make sure to always just to a buffer that exists.
---
rust-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust-mode.el b/rust-mode.el
index b6ef25b..9d17cc0 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1534,7 +1534,7 @@ rustfmt complain in the echo area."
(if (re-search-forward "\nerror:.+\n" nil
t)
(buffer-substring p0 (point))
(buffer-substring p0 (point-max)))))))))
- (when (and target-buffer target-point)
+ (when (and target-buffer (get-buffer target-buffer) target-point)
(switch-to-buffer target-buffer)
(goto-char (point-min))
(forward-line (1- (car target-point)))