[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/topspace 2c8440f5de 124/181: Add support for `smooth-sc
From: |
ELPA Syncer |
Subject: |
[elpa] externals/topspace 2c8440f5de 124/181: Add support for `smooth-scrolling` package (#14) |
Date: |
Tue, 23 Aug 2022 12:58:40 -0400 (EDT) |
branch: externals/topspace
commit 2c8440f5de4f3e69785dcfc3e6cedebe79146b4b
Author: Trevor Pogue <trevorpogue@gmail.com>
Commit: GitHub <noreply@github.com>
Add support for `smooth-scrolling` package (#14)
---
topspace.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/topspace.el b/topspace.el
index b1e7b585d5..3599e08041 100644
--- a/topspace.el
+++ b/topspace.el
@@ -277,6 +277,16 @@ LINE-OFFSET and REDISPLAY are used in the same way as in
`recenter'."
(window-start)
(point))))))))
+(defun topspace--smooth-scroll-lines-above-point (&rest r)
+ "Add support for `smooth-scroll-mode', ignore R."
+ ;; remove flycheck warnings by using R and checking smooth-scroll functions
+ r
+ (when (and (fboundp 'smooth-scroll-count-lines)
+ (fboundp 'smooth-scroll-line-beginning-position))
+ (+ (topspace--height)
+ (smooth-scroll-count-lines
+ (window-start) (smooth-scroll-line-beginning-position)))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Top space line height calculation
@@ -580,7 +590,10 @@ Topspace will not be enabled for:
#'topspace--filter-args-scroll-down)
(advice-add #'scroll-up :after #'topspace--after-scroll)
(advice-add #'scroll-down :after #'topspace--after-scroll)
- (advice-add #'recenter :after #'topspace--after-recenter))
+ (advice-add #'recenter :after #'topspace--after-recenter)
+ (when (fboundp 'smooth-scroll-lines-above-point)
+ (advice-add #'smooth-scroll-lines-above-point
+ :override #'topspace--smooth-scroll-lines-above-point)))
(dolist (window (get-buffer-window-list))
(with-selected-window window (topspace--draw)))))
- [elpa] externals/topspace b305bb56be 078/181: Add HISTORY.md containing legacy changelog, (continued)
- [elpa] externals/topspace b305bb56be 078/181: Add HISTORY.md containing legacy changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 270b4ace51 069/181: Update changelog for v0.1.2, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 9d3125c0ec 081/181: Test automatic changelog generation action, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 45b44cf17c 084/181: Add automatic changelog generation action, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 8309cd98ab 096/181: Private refactoring & minor improvements, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d4615f82f8 098/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 3fa532a343 100/181: Fix terminal bug from PR #10, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 8fcd11d4a5 113/181: Fix mwheel mouse scrolling down bug causes by #11, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace c5b424788f 116/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 9760a3ab5e 123/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 2c8440f5de 124/181: Add support for `smooth-scrolling` package (#14),
ELPA Syncer <=
- [elpa] externals/topspace d346f7b5e0 131/181: Update README.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 2f35223b78 132/181: Fix unexpected top space height change when echo area height changes (#18), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace ca7eb6b94a 133/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 1bfa4d1b28 135/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace e7df37fd99 139/181: Add section links to readme, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 15ac6c969a 141/181: Internal optimizations and refactoring, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 7741d88dca 140/181: Increase test coverage, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d3182133f9 144/181: Increase test coverage, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 186ea6091a 148/181: Internal optimizations and refactoring, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace bc35cd92d5 149/181: Update test.yml, ELPA Syncer, 2022/08/23