summaryrefslogtreecommitdiff
path: root/ext/-test-/wait/depend
diff options
context:
space:
mode:
authorima1zumi <mariimaizumi5@gmail.com>2021-11-17 00:58:43 +0900
committergit <svn-admin@ruby-lang.org>2021-11-21 13:56:26 +0900
commitf5829e293583aa6ba6a1f1314ee22881d58a5f96 (patch)
treef8ec61d0bb33bc7eed7a58afc133df139e14e560 /ext/-test-/wait/depend
parentfeda058531c0bdd5b673180accb4407dcc798c79 (diff)
[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
Diffstat (limited to 'ext/-test-/wait/depend')
0 files changed, 0 insertions, 0 deletions