mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Erase only on tty
This commit is contained in:
parent
e62a60927e
commit
c2428b8bf6
1 changed files with 2 additions and 2 deletions
|
@ -171,8 +171,8 @@ End
|
|||
end
|
||||
|
||||
def erase(e = true)
|
||||
if e and @columns > 0 and !@verbose
|
||||
"\r#{" "*@columns}\r"
|
||||
if e and @columns > 0 and @tty and !@verbose
|
||||
"\e[1K\r"
|
||||
else
|
||||
""
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue