[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 840d7f7a1e 195/323: Add :force t argument to
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 840d7f7a1e 195/323: Add :force t argument to rmsbolt-move-overlays |
Date: |
Thu, 9 Mar 2023 10:58:30 -0500 (EST) |
branch: externals/beardbolt
commit 840d7f7a1e0ad10fde53ca437cdd8415b42d31f2
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Add :force t argument to rmsbolt-move-overlays
This forces movement to recenter the first line of the match.
I'm not fully exposing this because I don't want to hard-support it,
this is best-of-effort for now.
---
rmsbolt.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 65cc861243..931cc0b655 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1588,8 +1588,11 @@ Are you running two compilations at the same time?"))
(get-buffer-window-list))
t))
-(defun rmsbolt-move-overlays ()
- "Function for moving overlays for rmsbolt."
+(cl-defun rmsbolt-move-overlays (&key (force nil))
+ "Function for moving overlays for rmsbolt.
+ If FORCE, always scroll overlay, even when one is visible.
+ FORCE also scrolls to the first line, instead of the first line
+ of the last block."
(when rmsbolt-mode
(if-let ((should-run rmsbolt-use-overlays)
(src-buffer
@@ -1641,14 +1644,17 @@ Are you running two compilations at the same time?"))
(setq line-visible visible))
(push (rmsbolt--setup-overlay start-pt end-pt
output-buffer)
rmsbolt-overlays)))))
- (unless line-visible
+ (when (or (not line-visible) force)
;; Scroll buffer to first line
(when-let ((scroll-buffer (if src-buffer-selected
output-buffer
src-buffer))
(line-scroll (if src-buffer-selected
(car-safe
- (cl-first asm-lines))
+ ;; If forcing, pick the min line
instead
+ (if force
+ (car-safe (last asm-lines))
+ (cl-first asm-lines)))
src-current-line))
(window (get-buffer-window scroll-buffer)))
(with-selected-window window
- [elpa] externals/beardbolt 7045b8116a 185/323: Fixed spelling mistake, (continued)
- [elpa] externals/beardbolt 7045b8116a 185/323: Fixed spelling mistake, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 8ad27e8490 176/323: Added basic documentation for Go support, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 25cd95a3b3 174/323: Fix a typo, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt af0a8a6ec9 189/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt fcefc0509d 184/323: Add basic documentation for Swift, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1b015e8d9b 212/323: Update ci to use alpine directly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 62e68ea2d4 194/323: Fix overlays not working on first compile with popup, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 536a699d1f 193/323: Clean up overlays and mappings if compilation fails, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ea3e0e4257 200/323: Fix incorrect matching of filenames for compile_commands.json, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2bc1afe528 196/323: Strip -save-temps when -P is provided, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 840d7f7a1e 195/323: Add :force t argument to rmsbolt-move-overlays,
ELPA Syncer <=
- [elpa] externals/beardbolt c86cc8f11e 199/323: Fix highlights not working with compile_commands.json in some cases, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1c0e96060b 229/323: Don't set global kill-buffer-hook, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7a964319ba 213/323: Merge branch 'zig-0.9' into 'master', ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 981522dcaa 218/323: Improve `rmsbolt-mode` docstring, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2e1ff0653e 216/323: Correct location of parse hook, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 345059d4f4 219/323: Set `defvar-local` vars with `setq`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4f6ffdd254 226/323: Rename rmsbolt-move-overlays -> rmsbolt-update-overlays, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 464b524e49 221/323: Remove redundant `and`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 51ff24b3b1 217/323: Fix native-comp docstring warnings, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0bc89903f1 231/323: on-kill-buffer: Fix error on missing output-buffer, ELPA Syncer, 2023/03/09