Skip to content

Commit

Permalink
Add comment for a following char of combined char
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Dec 21, 2021
1 parent 50ed575 commit d465667
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/reline/line_editor.rb
Expand Up @@ -2030,6 +2030,7 @@ def finish
@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
Expand Down

0 comments on commit d465667

Please sign in to comment.