Add Pry.auto_resize! to respond to width changes.
- Opt-in because we aren't sure where it doesn't work - Not Coolline-aware - Otherwise a big improvement
This commit is contained in:
parent
fd392b65fb
commit
5b346bc447
|
@ -257,6 +257,14 @@ class Pry
|
|||
end
|
||||
end
|
||||
|
||||
def self.auto_resize!
|
||||
trap :WINCH do
|
||||
size = `stty size`.split(/\s+/).map &:to_i
|
||||
Readline.set_screen_size *size
|
||||
Readline.refresh_line
|
||||
end
|
||||
end
|
||||
|
||||
def self.set_config_defaults
|
||||
config.input = Readline
|
||||
config.output = $stdout
|
||||
|
|
Loading…
Reference in New Issue