Closed tompng closed 1 week ago
Fixes #770
Reline::Unicode.take_range("ABC\1[zero]\2DEFGHIJ", 0, 6) # => "ABC\u0001[zero]\u0002DEF" (before) # => "ABC[zero]DEF" (after)
Readline removes \1 and \2. Reline was doing the same until 0.3.2 but broken since 0.3.3
\1
\2
# Readline 8.2 PTY.spawn('ruby', '-e', %q(require 'readline'; Readline.readline "prompt\1[invis]\2>")){|r,w|p r.readpartial(1024)} #=> "...prompt[invis]>..." # Reline PTY.spawn('ruby', '-e', %q(require 'reline'; Reline.readline "prompt\1[invis]\2>")){|r,w|20.times{p s=r.readpartial(1024);w.write "\e[1;1R" if s=~/\[6n/}} #=> "...prompt\x01[invis]\x02>..." # \x01 and \x02 should be removed
Fixes #770
Readline removes
\1
and\2
. Reline was doing the same until 0.3.2 but broken since 0.3.3