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.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb
index 1a916b4b98..7f94e95287 100644
--- a/lib/reline/unicode.rb
+++ b/lib/reline/unicode.rb
@@ -145,7 +145,13 @@ class Reline::Unicode
lines.last << NON_PRINTING_END
when csi
lines.last << csi
- seq << csi
+ unless in_zero_width
+ if csi == -"\e[m" || csi == -"\e[0m"
+ seq.clear
+ else
+ seq << csi
+ end
+ end
when osc
lines.last << osc
seq << osc