redmine-backporter.rb: get rid of wrapping

* tool/redmine-backporter.rb (readline): get rid of wrapping at
  the right edge on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-01-20 04:09:13 +00:00
Родитель 4b1784c669
Коммит 87bb3275aa
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -199,10 +199,14 @@ def readline(prompt = '')
console = IO.console console = IO.console
console.binmode console.binmode
ly, lx = console.winsize ly, lx = console.winsize
cls = "\r" + (" " * lx) + "\r" + prompt if /mswin|mingw/ =~ RUBY_PLATFORM or /^(?:vt\d\d\d|xterm)/i =~ ENV["TERM"]
cls = "\r\e[2K"
else
cls = "\r" << (" " * lx)
end
cls << "\r" << prompt
console.print prompt console.print prompt
console.flush console.flush
return gets.chomp if /mswin|mingw/ =~ RUBY_PLATFORM
line = '' line = ''
while 1 while 1
case c = console.getch case c = console.getch