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

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

[nongnu] elpa/rust-mode a814cd8 338/486: Pass 'visible to get-buffer-win


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode a814cd8 338/486: Pass 'visible to get-buffer-window
Date: Sat, 7 Aug 2021 09:25:48 -0400 (EDT)

branch: elpa/rust-mode
commit a814cd8b6f573b46df3918b6b728f000f9dd4782
Author: Tom Tromey <tom@tromey.com>
Commit: Tom Tromey <tom@tromey.com>

    Pass 'visible to get-buffer-window
    
    If I have two frames, with the *compilation* buffer in one frame and
    use next-error in the other frame, I get this error:
    
    Wrong type argument: window-live-p, nil
    
    This happens because get-buffer-window returns nil.  The fix is to
    pass 'visible to get-buffer-window, which will pick any visible frame
    from the same terminal.
---
 rust-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust-mode.el b/rust-mode.el
index 72109e5..ebc6ee9 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1609,7 +1609,7 @@ See `compilation-error-regexp-alist' for help on their 
format.")
    the compilation window until the top of the error is visible."
   (save-selected-window
     (when (eq major-mode 'rust-mode)
-      (select-window (get-buffer-window next-error-last-buffer))
+      (select-window (get-buffer-window next-error-last-buffer 'visible))
       (when (save-excursion
               (beginning-of-line)
               (looking-at " *-->"))



reply via email to

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