mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
special-case Windows for ANSI codes :(
This commit is contained in:
parent
ec7d0d055e
commit
4f2a496399
1 changed files with 7 additions and 2 deletions
|
@ -195,9 +195,14 @@ class Pry
|
|||
lines = 1
|
||||
end
|
||||
|
||||
move_up = "\e[#{lines}A\e[0G"
|
||||
if defined?(Win32::Console)
|
||||
move_up = "\e[#{lines}F"
|
||||
move_down = "\e[#{lines}E"
|
||||
else
|
||||
move_up = "\e[#{lines}A\e[0G"
|
||||
move_down = "\e[#{lines}B\e[0G"
|
||||
end
|
||||
whitespace = ' ' * overhang
|
||||
move_down = "\e[#{lines}B\e[0G"
|
||||
|
||||
"#{move_up}#{full_line}#{whitespace}#{move_down}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue