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.
- Add *.elc to gitignore - In tests/director.el, rename :run property key to :eval
Fix unexpected top space height change when echo area height changes (#…
…18) - Change default value for `topspace-autocenter-buffers` to `topspace-default-autocenter-buffers` function - Add condition to `topspace-default-autocenter-buffers` so that it returns nil if user has scrolled buffer in the selected window before. - Move default function values for some defcust's to User functions section
Remove Emacs 25.1 test untill coveralls reporting error is debugged
Internal optimizations and refactoring
- Reduce number of cases that `topspace--count-lines` must be used in `topspace--filter-args-scroll-down` - replace instances of `topsapce--height` with `topspace-height`
Internal optimizations and refactoring
- Remove uneeded `topspace--count-lines` call in `topspace--filter-args-scroll-down` - Make `topspace--count-lines` more accurate by not adding extra 1 to value - Increase test coverage - Make tests run in workflow only when a src file is changed - Add supported Emacs versions badge to readme
- Rename `topspace-height-to-make-buffer-centered` back to `topspace--height-to-make-buffer-centered` from when it was accidentally renamed in commit 15ac6c9
Add topspace-set-height, enhance topspace-center-position (#19)
- Add `topspace-set-height` to allow users and external packages to update the top space height.
- Increase flexibility of `topspace-center-position` by allowing it to also be an integer or function as follows:
If a float, it represents the position to center buffers as a ratio of
frame height, and can be a value from 0.0 to 1.0 where lower values center
buffers higher up in the screen.
If a positive or negative integer value, buffers will be centered by putting
their center line at a distance of `topspace-center-position' lines away
from the top of the selected window when positive, or from the bottom
of the selected window when negative.
The distance will be in units of lines with height `default-line-height',
and the value should be less than the height of the window.
If a function, the same rules above apply to the functions' return value.
- Add `topspace-default-active` and set `topspace-active` default value to it, which makes topspace
not active in child frames by default
- Add `topspace-buffer-was-scrolled-p` which is used in `topspace-default-autocenter-buffers`
- Internal refactoring and updating of docstringsInternal refactoring and performance optimizations
- `topspace--count-pixel-height` was causing large performance overhead when opening large buffers, this is now resolved - `topspace--count-pixel-height` performance was increased by about 50% overall