Skip to content

Commit

Permalink
Workaround for padding width with Aracritty on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Sep 2, 2022
1 parent f5fa30d commit fb4136c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/reline/line_editor.rb
Expand Up @@ -655,7 +655,10 @@ def add_dialog_proc(name, p, context = nil)
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)
Expand Down

0 comments on commit fb4136c

Please sign in to comment.