forked from glenux/mfm
fix: add workaround preserving terminal integrity
This commit is contained in:
parent
582282e525
commit
96f5521286
1 changed files with 5 additions and 3 deletions
|
@ -47,13 +47,13 @@ tput.listen do |char, key, sequence|
|
||||||
# were consumed as part of identifying the key that was
|
# were consumed as part of identifying the key that was
|
||||||
# pressed.
|
# pressed.
|
||||||
if char == 'q'
|
if char == 'q'
|
||||||
tput.normal_buffer
|
# tput.normal_buffer
|
||||||
# tput.reset_cursor
|
# tput.reset_cursor
|
||||||
# tput.exit_alt_charset_mode
|
# tput.exit_alt_charset_mode
|
||||||
# tput.attr("normal", 1)
|
# tput.attr("normal", 1)
|
||||||
# tput.soft_reset
|
# tput.soft_reset
|
||||||
system("stty echo")
|
# system("stty echo")
|
||||||
exit
|
break
|
||||||
else
|
else
|
||||||
tput.cr
|
tput.cr
|
||||||
tput.lf
|
tput.lf
|
||||||
|
@ -61,3 +61,5 @@ tput.listen do |char, key, sequence|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
tput.normal_buffer
|
||||||
|
# tput.clear
|
||||||
|
|
Loading…
Reference in a new issue