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

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

[elpa] externals/beardbolt 0f3293c607 224/323: Early-exit `when-let` if


From: ELPA Syncer
Subject: [elpa] externals/beardbolt 0f3293c607 224/323: Early-exit `when-let` if output-buffer has no window
Date: Thu, 9 Mar 2023 10:58:33 -0500 (EST)

branch: externals/beardbolt
commit 0f3293c60736d9ed89d83a2d4b65615df775ff77
Author: Erik Arvstedt <erik.arvstedt@gmail.com>
Commit: Erik Arvstedt <erik.arvstedt@gmail.com>

    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



reply via email to

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