Clear the current line before starting Pry.

This should fix #566.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
This commit is contained in:
Yorick Peterse 2012-05-25 16:49:50 +02:00
parent 5b5313b5de
commit 6f9dad48ab
1 changed files with 8 additions and 0 deletions

View File

@ -132,6 +132,14 @@ class Pry
head = target
end
# Clear the line before starting Pry. This fixes the issue discussed here:
# https://github.com/pry/pry/issues/566
if defined?(Win32::Console)
puts "\e[0F"
else
puts "\e[0A\e[0G"
end
# Enter the matrix
pry_instance.repl(head)
end