summaryrefslogtreecommitdiff
path: root/lib/reline/unicode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/reline/unicode.rb')
-rw-r--r--lib/reline/unicode.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb
index d111a849c4..a0fe0741f4 100644
--- a/lib/reline/unicode.rb
+++ b/lib/reline/unicode.rb
@@ -101,9 +101,9 @@ class Reline::Unicode
def self.get_mbchar_width(mbchar)
ord = mbchar.ord
- if (0x00 <= ord and ord <= 0x1F)
+ if (0x00 <= ord and ord <= 0x1F) # in EscapedPairs
return 2
- elsif (0x20 <= ord and ord <= 0x7E)
+ elsif (0x20 <= ord and ord <= 0x7E) # printable ASCII chars
return 1
end
m = mbchar.encode(Encoding::UTF_8).match(MBCharWidthRE)