mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
[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:
parent
5c32a1503f
commit
cf24a0483e
3 changed files with 13 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue