diff options
| author | Tom Tromey <tom@tromey.com> | 2017-08-23 16:14:01 -0600 |
|---|---|---|
| committer | Tom Tromey <tom@tromey.com> | 2017-08-23 16:14:01 -0600 |
| commit | a814cd8b6f573b46df3918b6b728f000f9dd4782 (patch) | |
| tree | e52edf33ffb336cd4db2195e675d287ec994d84b /rust-mode.el | |
| parent | 7ff04a8d26104c2e2c0737e219b320ecaeaafd9d (diff) | |
| download | rust-mode-a814cd8b6f573b46df3918b6b728f000f9dd4782.tar.gz | |
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.
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 2 |
1 files changed, 1 insertions, 1 deletions
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 " *-->")) |
