ronisbr / TerminalPager.jl

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

Work in fixed-height section of the Julia REPL #4

Closed carstenbauer closed 3 years ago

carstenbauer commented 3 years ago

Don't know if this is even possible with the current setup, but what I like about https://github.com/JuliaLang/julia/pull/38956 based on REPL.TerminalMenus is that all the interactivity works within a "fixed-height section" of the Julia REPL. That is, I can navigate up and down as much as I want and when I quit (q) the documentation bit only has taken so much of my REPL history. TerminalPager on the other hand seems to "reoutput" the relevant part of the docstring over and over again. Hence, if I go up and down multiple times my last line of Julia code is basically lost (the terminal output history is flooded with doctoring information).

carstenbauer commented 3 years ago

TerminalMenus-based pager:

https://user-images.githubusercontent.com/187980/115366900-fe2e2b80-a1c5-11eb-8463-e8f28507ef76.mp4

TerminalPager.jl:

https://user-images.githubusercontent.com/187980/115366948-07b79380-a1c6-11eb-8987-6df09cb28d9e.mp4

ronisbr commented 3 years ago

Hi @crstnbr

Thanks for this information! I thought that the escape sequence was deleting all the lines. However, it appear to adding more lines to "clean" the screen. I will see how can I improve this.

ronisbr commented 3 years ago

Hi @crstnbr

I think it is working now, can you please test?

carstenbauer commented 3 years ago

Works, thanks!