summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/irb.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 2b00de9..f9c2778 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -463,7 +463,8 @@ module IRB
end
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 +
+ prompt_i = @context.prompt_i.nil? ? "" : @context.prompt_i
+ ind = prompt(prompt_i, ltype, indent, line_no)[/.*\z/].size +
indent * 2 - p.size
ind += 2 if continue
@context.io.prompt = p + " " * ind if ind > 0