branch: externals/beardbolt
commit 0f3293c60736d9ed89d83a2d4b65615df775ff77
Author: Erik Arvstedt <[email protected]>
Commit: Erik Arvstedt <[email protected]>
Early-exit `when-let` if output-buffer has no window
In this case we don't need to calculate `line-scroll`.
---
rmsbolt.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index b578c18ab9..30b9a8a6ed 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1692,6 +1692,7 @@ Are you running two compilations at the same time?"))
(when-let ((scroll-buffer (if scroll-src-buffer-p
src-buffer
output-buffer))
+ (window (get-buffer-window scroll-buffer))
(line-scroll (if scroll-src-buffer-p
src-current-line
(progn
@@ -1699,8 +1700,7 @@ Are you running two compilations at the same time?"))
;; If forcing, pick the min line
instead
(if force
(car-safe (last asm-lines))
- (cl-first asm-lines))))))
- (window (get-buffer-window scroll-buffer)))
+ (cl-first asm-lines)))))))
(with-selected-window window
(rmsbolt--goto-line line-scroll)
;; If we scrolled, recenter