irb icon indicating copy to clipboard operation
irb copied to clipboard

Always use alternate sceen on alt-d

Open tompng opened this issue 1 year ago • 0 comments

Fixes screen corruption when PAGER=more is used.

When ALT+D is pressed while showing document dialog, document in shown in full screen using pager. IRB assumes that the pager switches to alternate screen, turns off alternate screen at exit, and restore IRB's screen.

Some pager like more does not do that. Screen corrupts. We need to switch to alternate screen manually.

irb_with_pager_eq_more To reproduce: PAGER=more irb (make sure more is not aliased to less) PAGER="sh -c 'cat;sleep 1'" irb

tompng avatar Aug 14 '24 04:08 tompng