mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Disable any implementation-defined special control characters
Including dsusp, lnext, and so on. https://github.com/ruby/reline/commit/a44abe586b
This commit is contained in:
parent
fbe229906b
commit
11db4d3a3b
1 changed files with 1 additions and 5 deletions
|
@ -121,15 +121,11 @@ class Reline::ANSI
|
|||
retrieve_keybuffer
|
||||
int_handle = Signal.trap('INT', 'IGNORE')
|
||||
otio = `stty -g`.chomp
|
||||
setting = ' -echo -icrnl cbreak'
|
||||
setting = ' -echo -icrnl cbreak -ixoff -iexten'
|
||||
stty = `stty -a`
|
||||
if /-parenb\b/ =~ stty
|
||||
setting << ' pass8'
|
||||
end
|
||||
if /\bdsusp *=/ =~ stty
|
||||
setting << ' dsusp undef'
|
||||
end
|
||||
setting << ' -ixoff'
|
||||
`stty #{setting}`
|
||||
Signal.trap('INT', int_handle)
|
||||
otio
|
||||
|
|
Loading…
Reference in a new issue