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:
parent
0cb9a49705
commit
45c24eaa51
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue