lib/cli/ui/truncater.rb in cli-ui-1.3.0 vs lib/cli/ui/truncater.rb in cli-ui-1.4.0
- old
+ new
@@ -50,14 +50,14 @@
# it looks like we could break here but we still want the
# width calculation for the rest of the characters.
end
end
when PARSE_ESC
- case cp
+ mode = case cp
when LEFT_SQUARE_BRACKET
- mode = PARSE_ANSI
+ PARSE_ANSI
else
- mode = PARSE_ROOT
+ PARSE_ROOT
end
when PARSE_ANSI
# ANSI escape codes preeeetty much have the format of:
# \x1b[0-9;]+[A-Za-z]
case cp