summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-06-19 08:28:00 +0900
committeraycabta <aycabta@gmail.com>2019-06-19 08:28:00 +0900
commit85ff2d74a217a02d050492e607b3a2764645107b (patch)
treea21a86198b25d65468b66445d78bc75d475a6d52 /lib/irb.rb
parent84903b31c87b98083cec406745dc7e3088ba643b (diff)
Avoid auto indent in prompt when dynamic auto indent
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index eee6c3a..2c7b17d 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -462,7 +462,7 @@ module IRB
else
@context.io.prompt = p = ""
end
- if @context.auto_indent_mode
+ if @context.auto_indent_mode and !@context.io.respond_to?(:auto_indent)
unless ltype
ind = prompt(@context.prompt_i, ltype, indent, line_no)[/.*\z/].size +
indent * 2 - p.size