mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix https://github.com/ruby/irb/issues/308
This bug occurred when `dialog.width - calculate_width(s, true)` was negative.
When `dialog.width` is shorter than `old_dialog.width`, it calculates how much padding it has to do. However, there are cases where `s` is longer than `dialog.width`, as in the issue. In that case, `padding_space_with_escape_sequences` will crash.
Here, `old_dialog.width` is longer than `dialog.width`, so I changed the padding width to `old_dialog.width - dialog.width`.
|
||
|---|---|---|
| .. | ||
| windows | ||
| yamatanooroti | ||
| helper.rb | ||
| test_config.rb | ||
| test_history.rb | ||
| test_key_actor_emacs.rb | ||
| test_key_actor_vi.rb | ||
| test_key_stroke.rb | ||
| test_kill_ring.rb | ||
| test_macro.rb | ||
| test_reline.rb | ||
| test_reline_key.rb | ||
| test_string_processing.rb | ||
| test_terminfo.rb | ||
| test_unicode.rb | ||
| test_within_pipe.rb | ||