1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib
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`.

c581c31e0f
2021-11-21 13:56:26 +09:00
..
benchmark
bundler [rubygems/rubygems] Previous logic can mostly go now 2021-11-19 10:12:11 +09:00
cgi
csv [ruby/csv] Add support for Ractor (https://github.com/ruby/csv/pull/218) 2021-10-24 05:57:33 +09:00
delegate
did_you_mean
drb
erb
error_highlight [ruby/error_highlight] Make the formatter mechanism support Ractor 2021-10-27 11:29:20 +09:00
forwardable
getoptlong
irb
logger
net [ruby/net-http] gemspec: Drop unused directive "executables" 2021-11-17 19:09:14 +09:00
observer
optparse
ostruct
pstore
racc [ruby/racc] Fix a private method name 2021-11-04 08:58:45 +09:00
rdoc
reline [ruby/reline] Correct padding space calculation 2021-11-21 13:56:26 +09:00
rinda
rubygems Do not document vendored files [ci skip] 2021-11-19 21:55:27 +09:00
set [ruby/set] Bump the version to 1.0.2 2021-11-16 20:55:33 +09:00
singleton
timeout
unicode_normalize
uri
weakref
yaml
.document
abbrev.gemspec
abbrev.rb
base64.gemspec
base64.rb
benchmark.rb
bundler.rb [rubygems/rubygems] Vendor a pure ruby implementation of SHA1 2021-10-25 20:24:32 +09:00
cgi.rb
csv.rb [ruby/csv] Add support for Ractor (https://github.com/ruby/csv/pull/218) 2021-10-24 05:57:33 +09:00
delegate.rb
did_you_mean.rb
drb.rb
English.gemspec
English.rb
erb.gemspec
erb.rb
error_highlight.rb
fileutils.gemspec
fileutils.rb
find.gemspec
find.rb
forwardable.rb
getoptlong.rb
ipaddr.gemspec [ruby/ipaddr] Bump version to 1.2.3 2021-11-16 21:04:46 +09:00
ipaddr.rb
irb.rb
logger.rb
mkmf.rb
mutex_m.gemspec
mutex_m.rb
observer.rb
open-uri.gemspec
open-uri.rb
open3.gemspec
open3.rb
optionparser.rb
optparse.rb
ostruct.rb
pp.gemspec
pp.rb
prettyprint.gemspec
prettyprint.rb
pstore.rb
racc.rb
rdoc.rb
readline.gemspec
readline.rb
reline.rb
resolv-replace.gemspec
resolv-replace.rb
resolv.gemspec
resolv.rb
ruby2_keywords.gemspec
rubygems.rb
securerandom.gemspec
securerandom.rb
set.rb
shellwords.gemspec
shellwords.rb
singleton.rb
tempfile.gemspec
tempfile.rb
time.gemspec
time.rb
timeout.rb
tmpdir.gemspec
tmpdir.rb [ruby/tmpdir] [DOC] Fix syntax in example code [ci skip] 2021-11-11 10:37:35 +09:00
tsort.gemspec
tsort.rb
un.gemspec
un.rb
uri.rb
weakref.rb
yaml.rb