diff options
author | aycabta <aycabta@gmail.com> | 2019-11-21 07:00:01 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-11-21 07:01:41 +0900 |
commit | 95f20f463aa07fbb2e5efbdb89a93d94861cdc49 (patch) | |
tree | 5f78eea4aa76b8504a45acdb9a5d54c9f108b981 | |
parent | 1197a036ae1c48ac0842bb2a0dc8af213def47d7 (diff) | |
download | bundler-95f20f463aa07fbb2e5efbdb89a93d94861cdc49.tar.gz |
Consider escape sequence to calculate prompt width
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index aab20b8657..ed1e730c9c 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -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 |