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

[ruby/reline] Add comment for a following char of combined char

https://github.com/ruby/reline/commit/d465667f57
This commit is contained in:
aycabta 2021-12-22 00:01:58 +09:00 committed by git
parent 40a1af6151
commit daf4a8884b

View file

@ -2030,6 +2030,7 @@ class Reline::LineEditor
@byte_pointer += bytesize
last_mbchar = @line.byteslice((@byte_pointer - bytesize - last_byte_size), last_byte_size)
if last_byte_size != 0 and (last_mbchar + str).grapheme_clusters.size == 1
# combined char
width = 0
end
@cursor += width