mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
[ruby/reline] Use IO#write instead of IO#print
IO#print always adds a string of $\ automatically.
a93119c847
This commit is contained in:
parent
78282d4655
commit
2efb38e766
4 changed files with 12 additions and 12 deletions
|
@ -319,7 +319,7 @@ class Reline::LineEditor
|
|||
@rerender_all = true
|
||||
@menu_info.list.sort!.each do |item|
|
||||
Reline::IOGate.move_cursor_column(0)
|
||||
@output.print item
|
||||
@output.write item
|
||||
@output.flush
|
||||
scroll_down(1)
|
||||
end
|
||||
|
@ -516,7 +516,7 @@ class Reline::LineEditor
|
|||
end
|
||||
next
|
||||
end
|
||||
@output.print line
|
||||
@output.write line
|
||||
if Reline::IOGate.win? and calculate_width(line, true) == Reline::IOGate.get_screen_size.last
|
||||
# A newline is automatically inserted if a character is rendered at eol on command prompt.
|
||||
@rest_height -= 1 if @rest_height > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue