mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
[ruby/reline] Do not send color reset sequence when GeneralIO is
used
(https://github.com/ruby/reline/pull/661)
3719702808
This commit is contained in:
parent
f46b77596d
commit
3adaba0e81
5 changed files with 21 additions and 9 deletions
|
@ -372,12 +372,12 @@ class Reline::LineEditor
|
|||
# do nothing
|
||||
elsif level == :blank
|
||||
Reline::IOGate.move_cursor_column base_x
|
||||
@output.write "\e[0m#{' ' * width}"
|
||||
@output.write "#{Reline::IOGate::RESET_COLOR}#{' ' * width}"
|
||||
else
|
||||
x, w, content = new_items[level]
|
||||
content = Reline::Unicode.take_range(content, base_x - x, width) unless x == base_x && w == width
|
||||
Reline::IOGate.move_cursor_column base_x
|
||||
@output.write "\e[0m#{content}\e[0m"
|
||||
@output.write "#{Reline::IOGate::RESET_COLOR}#{content}#{Reline::IOGate::RESET_COLOR}"
|
||||
end
|
||||
base_x += width
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue