1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Add resetting char attr that I forgot

https://github.com/ruby/irb/commit/b5f953dc33
This commit is contained in:
aycabta 2021-12-21 15:36:39 +09:00 committed by git
parent 10a2273e99
commit 093aaeffbc

View file

@ -827,7 +827,7 @@ module IRB
str = "%s...\e[0m" % lines.first
multiline_p = false
else
str = str.gsub(/(\A.*?\n).*/m, "\\1...")
str = str.gsub(/(\A.*?\n).*/m, "\\1...\e[0m")
end
else
output_width = Reline::Unicode.calculate_width(@context.return_format % str, true)