1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

correct_indentation ignores readline \001 & \002 sequences

This commit is contained in:
Eugene Diachkin 2013-01-22 19:40:14 +02:00
parent 0cb9a49705
commit 45c24eaa51

View file

@ -389,6 +389,7 @@ class Pry
# the difference in length between the old line and the new one). # the difference in length between the old line and the new one).
# @return [String] # @return [String]
def correct_indentation(prompt, code, overhang=0) def correct_indentation(prompt, code, overhang=0)
prompt = prompt.delete("\001\002")
full_line = prompt + code full_line = prompt + code
whitespace = ' ' * overhang whitespace = ' ' * overhang