[ruby/reline] Long line performance

(https://github.com/ruby/reline/pull/688)

* Improve C-e (ed_move_to_end) performance for long line

* Reline::Unicode.split_by_width optimization for RESET_SGR

0c8d3c827a
This commit is contained in:
tomoya ishida 2024-04-25 02:33:36 +09:00 committed by git
parent 5c32a1503f
commit cf24a0483e
3 changed files with 13 additions and 6 deletions

View file

@ -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