ronisbr / TerminalPager.jl

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

Use redirect_stdout to restore stdout #31

Closed GregPlowman closed 11 months ago

GregPlowman commented 11 months ago

Attempt to fix #30

Use redirect_stdout to restore stdout

I think (but I'm not sure) that stdin is already redirected from TTY, so restoring stdin seems unnecessary, and caused error with redirect_stdin(old_stdin)

I'm not confident that this is correct, but it seems to compile and pass tests locally for me on both Julia v1.6.7 and Julia v1.9.3. Would recommend a review from someone who understands this stuff.

ronisbr commented 11 months ago

Hi @GregPlowman !

Thanks! LGTM!