mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Workaround for padding width with Aracritty on macOS
https://github.com/ruby/reline/commit/fb4136c8a7
This commit is contained in:
parent
7ff50ee35c
commit
0d2422cf63
1 changed files with 4 additions and 1 deletions
|
@ -655,7 +655,10 @@ class Reline::LineEditor
|
|||
end
|
||||
|
||||
private def padding_space_with_escape_sequences(str, width)
|
||||
str + (' ' * (width - calculate_width(str, true)))
|
||||
padding_width = width - calculate_width(str, true)
|
||||
# padding_width should be only positive value. But macOS and Aracritty returns negative value.
|
||||
padding_width = 0 if padding_width < 0
|
||||
str + (' ' * padding_width)
|
||||
end
|
||||
|
||||
private def render_each_dialog(dialog, cursor_column)
|
||||
|
|
Loading…
Reference in a new issue