diff options
author | aycabta <[email protected]> | 2021-09-06 05:19:50 +0900 |
---|---|---|
committer | git <[email protected]> | 2021-09-06 05:22:29 +0900 |
commit | 1fe604a67501d5f05694266d065833e3c150d79a (patch) | |
tree | cc41da18fa6b2c18b1a3453712a4c17e356ebd0d /lib/reline/unicode.rb | |
parent | f831ecd8d5516842bece52c5aeb8a5a9da8539bc (diff) |
[ruby/reline] Add comments about optimizing chars in ASCII range of UTF-8
https://github.com/ruby/reline/commit/3c13d93486
Diffstat (limited to 'lib/reline/unicode.rb')
-rw-r--r-- | lib/reline/unicode.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb index d111a849c4..a0fe0741f4 100644 --- a/lib/reline/unicode.rb +++ b/lib/reline/unicode.rb @@ -101,9 +101,9 @@ class Reline::Unicode def self.get_mbchar_width(mbchar) ord = mbchar.ord - if (0x00 <= ord and ord <= 0x1F) + if (0x00 <= ord and ord <= 0x1F) # in EscapedPairs return 2 - elsif (0x20 <= ord and ord <= 0x7E) + elsif (0x20 <= ord and ord <= 0x7E) # printable ASCII chars return 1 end m = mbchar.encode(Encoding::UTF_8).match(MBCharWidthRE) |