mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Check wether prompt_i is nil
This commit is contained in:
parent
078e50c5e9
commit
10d7b39d5d
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue