mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Fix crash to input é
. refs #174
https://github.com/ruby/reline/commit/ba5e267e5f
This commit is contained in:
parent
ff4656ee64
commit
e47e5db889
1 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,9 @@ class Reline::Unicode
|
||||||
| #{ EastAsianWidth::TYPE_NA }
|
| #{ EastAsianWidth::TYPE_NA }
|
||||||
| #{ EastAsianWidth::TYPE_N }
|
| #{ EastAsianWidth::TYPE_N }
|
||||||
)
|
)
|
||||||
|
| (?<ambiguous_width>
|
||||||
|
#{EastAsianWidth::TYPE_A}
|
||||||
|
)
|
||||||
/x
|
/x
|
||||||
|
|
||||||
def self.get_mbchar_width(mbchar)
|
def self.get_mbchar_width(mbchar)
|
||||||
|
@ -98,6 +101,7 @@ class Reline::Unicode
|
||||||
when m[:width_3] then 3
|
when m[:width_3] then 3
|
||||||
when m[:width_0] then 0
|
when m[:width_0] then 0
|
||||||
when m[:width_1] then 1
|
when m[:width_1] then 1
|
||||||
|
when m[:ambiguous_width] then Reline.ambiguous_width
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue