summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/highline/terminal/unix_stty.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/highline/terminal/unix_stty.rb b/lib/highline/terminal/unix_stty.rb
index ad9c85d..1dbed36 100644
--- a/lib/highline/terminal/unix_stty.rb
+++ b/lib/highline/terminal/unix_stty.rb
@@ -32,13 +32,13 @@ class HighLine
# (see Terminal#raw_no_echo_mode)
def raw_no_echo_mode
- @state = `stty -g`
+ save_stty
system "stty raw -echo -icanon isig"
end
# (see Terminal#restore_mode)
def restore_mode
- system "stty #{@state}"
+ restore_stty
print "\r"
end