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

Consider escape sequence to calculate prompt width

This commit is contained in:
aycabta 2019-11-21 07:00:01 +09:00
parent 1197a036ae
commit 95f20f463a

View file

@ -192,7 +192,7 @@ class Reline::LineEditor
lines.each_with_index { |line, i|
prompt = ''
prompt = prompt_list[i] if prompt_list and prompt_list[i]
result += calculate_height_by_width(calculate_width(prompt + line))
result += calculate_height_by_width(calculate_width(prompt, true) + calculate_width(line))
}
result
end