1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/reline/yamatanooroti
ima1zumi f5829e2935 [ruby/reline] Correct padding space calculation
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`.

https://github.com/ruby/reline/commit/c581c31e0f
2021-11-21 13:56:26 +09:00
..
multiline_repl [ruby/reline] Correct padding space calculation 2021-11-21 13:56:26 +09:00
termination_checker.rb [ruby/reline] Add workspace member for the latest IRB's implementation 2021-08-14 22:13:31 +09:00
test_rendering.rb [ruby/reline] Correct padding space calculation 2021-11-21 13:56:26 +09:00