ronisbr / TerminalPager.jl

Pure Julia implementation of the command less
MIT License
116 stars 8 forks source link

add u/d keybindings #22

Closed pohzipohzi closed 1 year ago

pohzipohzi commented 1 year ago

This adds the u/d keybindings (scroll up/down half a page) found in less.

Test this in a julia repl with the working directory at the root of this repository:

include("src/TerminalPager")
[i for i in 1:100] |> TerminalPager.pager
ronisbr commented 1 year ago

Thanks @pohzipohzi !!

Is it possible to add tests for those keybindings here:

https://github.com/ronisbr/TerminalPager.jl/blob/main/test/internals/key_bindings.jl

codecov[bot] commented 1 year ago

Codecov Report

Merging #22 (160ea90) into main (51210ef) will decrease coverage by 0.30%. The diff coverage is n/a.

:exclamation: Current head 160ea90 differs from pull request most recent head ae02d5c. Consider uploading reports for the commit ae02d5c to get more accurate results

@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   19.18%   18.87%   -0.31%     
==========================================
  Files          12       12              
  Lines         735      747      +12     
==========================================
  Hits          141      141              
- Misses        594      606      +12     
Impacted Files Coverage Δ
src/input/keybindings.jl 87.50% <ø> (ø)
src/pager.jl 38.61% <0.00%> (-0.61%) :arrow_down:
src/help.jl 0.00% <0.00%> (ø)
src/repl.jl 0.00% <0.00%> (ø)
src/debug.jl 0.00% <0.00%> (ø)
src/screen.jl 0.00% <0.00%> (ø)
src/search.jl 0.00% <0.00%> (ø)
src/input/input.jl 0.00% <0.00%> (ø)
src/command_line.jl 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ronisbr commented 1 year ago

Hi @pohzipohzi !

Sorry for the delay, I missed that you had pushed the tests. Thanks!!