Closed jneidel closed 3 years ago
Hello there, just implement half screen scroll: https://github.com/wustho/epr/commit/bff2316efe578185db59b402e7fa5745fde89b4f.
Sorry took so long for such a simple stuff. Because I wanted to make visual indicator (some kinda like kanliot suggest in https://github.com/wustho/epr/issues/26) when we scroll more than a single line (by using 5j
(scroll down 5 lines), 6k
(scroll up 6 lines) or half screen scroll up|down, but not page up|down). So we can get visual line looking like this when we scroll down more than one line:
...
line displayed in screen before scroll
line displayed in screen before scroll
-------------------------------------- <-- visual line
line not yet displayed before scroll
line not yet displayed before scroll
...
And when we scroll up more than one line, we will get:
...
line not yet displayed before scroll
line not yet displayed before scroll
-------------------------------------- <-- visual line
line displayed in screen before scroll
line displayed in screen before scroll
...
Thanks a lot!
What keys does this translate to?
# key bindings
HALF_DOWN = {4}
HALF_UP = {21}
And it should probably be added to help screen and --help flag usage info :smile:
Forgot to edit help text... Just fixed it...
4
translates to ^d
and 21
to ^u
like you suggest. Reference: ASCII chars.
Use the keys
d
andu
(from^d
/^u
in vim) to go down/up half a page.