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

No Pry.config in Pry::Indent

This commit is contained in:
Conrad Irwin 2014-04-29 23:43:19 -07:00
parent a2fe6306cf
commit a5b0a57e10
2 changed files with 1 additions and 6 deletions

View file

@ -402,10 +402,5 @@ class Pry
"#{move_up}#{prompt}#{colorize_code(code)}#{whitespace}#{move_down}"
end
# Given the current Pry environment, should we try to correct indentation?
def should_correct_indentation?
Pry::Helpers::BaseHelpers.use_ansi_codes? && Pry.config.correct_indent
end
end
end

View file

@ -104,7 +104,7 @@ class Pry
original_val = "#{indentation}#{val}"
indented_val = @indent.indent(val)
if output.tty? && @indent.should_correct_indentation?
if output.tty? && pry.config.correct_indent && Pry::Helpers::BaseHelpers.use_ansi_codes?
output.print @indent.correct_indentation(
current_prompt, indented_val,
original_val.length - indented_val.length