Show "-" if indent level is negative

This commit is contained in:
aycabta 2019-07-01 21:14:50 +09:00
Родитель 90c51ca391
Коммит 76851381cb
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -670,10 +670,18 @@ module IRB
when "l"
ltype
when "i"
if $1
format("%" + $1 + "d", indent)
if indent < 0
if $1
"-".rjust($1.to_i)
else
"-"
end
else
indent.to_s
if $1
format("%" + $1 + "d", indent)
else
indent.to_s
end
end
when "n"
if $1