From a446cb105fced383f6f51006d5f67490ba176509 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 28 Nov 2018 15:02:36 +0900 Subject: [PATCH] Reduce 1 char from progress output for Windows Windows command prompt force wraps at the maximum number of chars of the last line so this commit reduces 1 char of it. --- lib/rdoc/stats/normal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdoc/stats/normal.rb b/lib/rdoc/stats/normal.rb index 0c661c5498..0a22f0582b 100644 --- a/lib/rdoc/stats/normal.rb +++ b/lib/rdoc/stats/normal.rb @@ -31,7 +31,7 @@ def print_file files_so_far, filename # will be truncated if necessary. size = IO.respond_to?(:console_size) ? IO.console_size : IO.console.winsize terminal_width = size[1].to_i.nonzero? || 80 - max_filename_size = terminal_width - progress_bar.size + max_filename_size = (terminal_width - progress_bar.size) - 1 if filename.size > max_filename_size then # Turn "some_long_filename.rb" to "...ong_filename.rb"