[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/topspace ba275f7c94 119/181: Fix off-by-one-line scroll
From: |
ELPA Syncer |
Subject: |
[elpa] externals/topspace ba275f7c94 119/181: Fix off-by-one-line scroll bug at top of buffer introduced in #10 |
Date: |
Tue, 23 Aug 2022 12:58:40 -0400 (EDT) |
branch: externals/topspace
commit ba275f7c944738b1db839516dff1c4e97edb868b
Author: Trevor Pogue <poguete@mcmaster.ca>
Commit: Trevor Pogue <poguete@mcmaster.ca>
Fix off-by-one-line scroll bug at top of buffer introduced in #10
- The buffer would get scrolled up too far by one line when scrolling
text up in the following condition: top space was present before
scrolling but not present after, and the top line in the buffer should
be at the very top of the window after (but the bug made the second line
be at the top of the window). This is resolved here.
- The technical reason for the bug was that 0.0 would be passed to
`scroll-up`
after `topspace--filter-args-scroll-up`, assuming that `scroll-up` would
not
scroll in this scenario, however it turns out that if
`scroll-up`/`scroll-down` are passed a zero-valued float they will
still scroll by one line.
---
topspace.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/topspace.el b/topspace.el
index 713f59c78b..dffc299d43 100644
--- a/topspace.el
+++ b/topspace.el
@@ -211,7 +211,7 @@ TOTAL-LINES is used in the same way as in `scroll-down'."
(topspace--draw new-topspace-height)
(setq total-lines
(- total-lines (- new-topspace-height old-topspace-height)))
- (if (display-graphic-p) total-lines (round total-lines))))
+ (round total-lines)))
(defun topspace--filter-args-scroll-down (&optional total-lines)
"Run before `scroll-down' for scrolling above the top line.
- [elpa] externals/topspace 4455f47ed4 093/181: Reword docstrings, (continued)
- [elpa] externals/topspace 4455f47ed4 093/181: Reword docstrings, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d0e7e89413 094/181: Put topspace-empty-line-indicator inside fringe (#9), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 9d6f0ef459 099/181: Fix terminal bug and minor mouse scrolling bug, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 6d3b5e5cf7 103/181: Update README.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace df7cb1ce4f 107/181: Bump version: 0.1.2 → 0.2.0, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace edb0d582ae 108/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace c21ceb5e3a 109/181: Set back Unreleased as recent version in changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace e3cd398678 112/181: Fix bug caused by #11 when scrolling with topspace disabled, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace cb9dbf5c0f 114/181: Start adding tests, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace af98947c27 115/181: Prevent "Beginning of buffer" error message (#12), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace ba275f7c94 119/181: Fix off-by-one-line scroll bug at top of buffer introduced in #10,
ELPA Syncer <=
- [elpa] externals/topspace 334cf13ab5 121/181: Internal optimization, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace f5d01b58f8 127/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 4724b926a4 134/181: Add continuous integration and coverage, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace a4c5873fb4 125/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d376bca4c8 130/181: Internal refactoring, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace e6cc9081a2 128/181: Add `topspace-height` function for use by external packages (#15), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 7a0d565b68 126/181: Set back changelog head to `Unreleased`, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace f79b07c982 129/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 64bbce19a0 136/181: Add coverage badge to readme, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 0541624721 138/181: Update test.yml, ELPA Syncer, 2022/08/23