Add topspace-active, improve topspace-autocenter-buffers
Resolves #3. * Add customizable variable `topspace-active` to determine when `topspace-mode` mode is active / has any effect on buffer. It can be set to t, nil, or a predicate function. This is useful in particular when `global-topspace-mode` is enabled but you want `topspace-mode` to be inactive in certain buffers or in any specific circumstance. When inactive, `topspace-mode` will still technically be on, but will be effectively off and have no effect on the buffer. * Allow `topspace-autocenter-buffers` to be either t, nil, or a predicate function (before it could only be t or nil)
Add HISTORY.md containing legacy changelog
Moving to automatic changelog generator after this, but some legacy developement history does not follow the correct API for the automatic changelog, so this legacy changelog file will better show version changes made before this commit.
- rename topspace--eval-choice-p to topspace--eval-choice - rename topspace--put to topspace--draw - Fix flycheck warnings - Update version number
Private refactoring & minor improvements
- Fix indentation - Make clarification in docstring - Update window-configuration-change - Preserve previous column position when correcting the cursor from scrolling past window-end - Make private how many lines away from `window-end` cursor can get
Fix terminal bug and minor mouse scrolling bug
- Fix issue from PR #10 that broke ability to scroll down when in terminal: Resolved by making the line height calculations on integers instead of floating-point when in terminal. - Fix minor issue from PR #10 caused when scrolling with mouse: When mouse scrolled the buffer all the way down it made the top space unexpectedly jump. This was resolved by lowering topspace command hook priorities such that the hooks are run sooner in the list.
- PR #10 introduced a bug where scrolling doesn't working as expected when Emacs is run in terminal. The fix for this in the previous commit was not sufficient. This commit fixes the source of the problem, which was that floats were being passed to scroll-up/scroll-down from the added advice functions, but that seems to be invalid when in terminal. So now only integers are being passed to scroll-up/scroll-down when in terminal.
- Remove extra keywords from slogan to make it more concise - Add usage section & reorder other sections - Add link to overlay term
Update GIF to show the topspace-empty-line-indicator in the left fringe
Fix bug caused by #11 when scrolling with topspace disabled
- #11 caused a bug where is was not possible to scroll anymore if topspace is disabled in the current buffer. This resolves that issue.
Fix mwheel mouse scrolling down bug causes by #11
- #11 caused a bug with mouse scrolling - when scrolling down it would move buffer suddenly all the way to the bottom in some cases. This resolves that issue.
Prevent "Beginning of buffer" error message (#12)
- Prevent a "Beginning of buffer" error message from appearing in the *Messages* buffer when scrolling above the top line. - No longer modify `mwheel-scroll-down-function`, because before it was modified in order to prevent a scrolling bug, but that bug is avoided now by preventing the "Beginning of buffer" error from occurring.
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.