From e47e5db88943b7421f802f1fdfd34ba2224ec057 Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Thu, 12 Nov 2020 12:36:48 +0900 Subject: =?UTF-8?q?[ruby/reline]=20Fix=20crash=20to=20input=20`=C3=A9`.=20?= =?UTF-8?q?refs=20#174?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/ruby/reline/commit/ba5e267e5f --- lib/reline/unicode.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 } ) + | (? + #{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 -- cgit v1.2.3