From 87bb3275aaefdda20a7b558c9e9d53c6d4694bbe Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Jan 2015 04:09:13 +0000 Subject: 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 --- tool/redmine-backporter.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tool') diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index 4815c52c0f..46346b3fd7 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -199,10 +199,14 @@ def readline(prompt = '') console = IO.console console.binmode 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.flush - return gets.chomp if /mswin|mingw/ =~ RUBY_PLATFORM line = '' while 1 case c = console.getch -- cgit v1.2.3