1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Check wether multibyte character is split

This commit is contained in:
aycabta 2019-07-25 17:19:11 +09:00
parent 8e53d18e67
commit 0f9ec4a877

View file

@ -811,6 +811,10 @@ class Reline::LineEditor
i = 0
while i < @byte_pointer do
slice = @line.byteslice(i, @byte_pointer - i)
unless slice.valid_encoding?
i += 1
next
end
if quote and slice.start_with?(/(?!\\)#{Regexp.escape(quote)}/) # closing "
quote = nil
i += 1