diff options
author | manga_osyo <[email protected]> | 2020-11-12 12:36:48 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-12-05 02:58:58 +0900 |
commit | e47e5db88943b7421f802f1fdfd34ba2224ec057 (patch) | |
tree | 38fabcaf5ed2a6fb34db0a2609fda64cb20b1cb7 /lib/reline/unicode.rb | |
parent | ff4656ee64f0dc7ea7eb0f87d90dd718948f4de3 (diff) |
[ruby/reline] Fix crash to input `é`. refs #174
https://github.com/ruby/reline/commit/ba5e267e5f
Diffstat (limited to 'lib/reline/unicode.rb')
-rw-r--r-- | lib/reline/unicode.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb index df2f6719a4..d482997bab 100644 --- a/lib/reline/unicode.rb +++ b/lib/reline/unicode.rb @@ -89,6 +89,9 @@ class Reline::Unicode | #{ EastAsianWidth::TYPE_NA } | #{ EastAsianWidth::TYPE_N } ) + | (?<ambiguous_width> + #{EastAsianWidth::TYPE_A} + ) /x def self.get_mbchar_width(mbchar) @@ -98,6 +101,7 @@ class Reline::Unicode when m[:width_3] then 3 when m[:width_0] then 0 when m[:width_1] then 1 + when m[:ambiguous_width] then Reline.ambiguous_width else nil end |