Skip to content

Commit ba5e267

Browse files
committed
Fix crash to input é. refs #174
1 parent e79e402 commit ba5e267

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/reline/unicode.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def self.escape_for_print(str)
8989
| #{ EastAsianWidth::TYPE_NA }
9090
| #{ EastAsianWidth::TYPE_N }
9191
)
92+
| (?<ambiguous_width>
93+
#{EastAsianWidth::TYPE_A}
94+
)
9295
/x
9396

9497
def self.get_mbchar_width(mbchar)
@@ -98,6 +101,7 @@ def self.get_mbchar_width(mbchar)
98101
when m[:width_3] then 3
99102
when m[:width_0] then 0
100103
when m[:width_1] then 1
104+
when m[:ambiguous_width] then Reline.ambiguous_width
101105
else
102106
nil
103107
end

0 commit comments

Comments
 (0)