summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0xAB <0xAB@protonmail.com>2017-09-01 10:54:58 +0100
committer0xAB <0xAB@protonmail.com>2017-09-01 10:54:58 +0100
commitfa84f9855e1d350044701069ce431355ffbeb8b3 (patch)
tree2c8f1226ec93f7f3a6bae346e3f74d4811de797f
parent3cc7f056df3ceae9fbf705f29d48c2f89591eaad (diff)
downloadpry-fa84f9855e1d350044701069ce431355ffbeb8b3.tar.gz
fix https://github.com/pry/pry/issues/1636
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/pry/repl.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16ed36b6..14a4a240 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
### HEAD
+* Fix [#1636](https://github.com/pry/pry/issues/1636)
* Add 'alias-prompt' command.
* Add `Pry::Prompt.[]`, `Pry::Prompt.add_prompt()`, `Pry::Prompt.alias_prompt()` and
diff --git a/lib/pry/repl.rb b/lib/pry/repl.rb
index e70130a4..4b74ba87 100644
--- a/lib/pry/repl.rb
+++ b/lib/pry/repl.rb
@@ -104,7 +104,7 @@ class Pry
original_val = "#{indentation}#{val}"
indented_val = @indent.indent(val)
- if output.tty? && pry.config.correct_indent && Pry::Helpers::BaseHelpers.use_ansi_codes?
+ if output.tty? && pry.color && 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