summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-12-22 00:01:58 +0900
committergit <svn-admin@ruby-lang.org>2021-12-24 00:51:46 +0900
commitdaf4a8884b36f44127fca9d0502080b32eda7f03 (patch)
treeae1d018a92d5b0daea5b1d4ff3280e0ae4f89bd1
parent40a1af615197346d423afa38c2854f9faf8ed3f3 (diff)
[ruby/reline] Add comment for a following char of combined char
https://github.com/ruby/reline/commit/d465667f57
-rw-r--r--lib/reline/line_editor.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 9b206d9adf..053ec441a9 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -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