Skip to content

Commit dd3549f

Browse files
committed
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.
1 parent 355c4e4 commit dd3549f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/stats/normal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def print_file files_so_far, filename
3030
# will be truncated if necessary.
3131
size = IO.respond_to?(:console_size) ? IO.console_size : IO.console.winsize
3232
terminal_width = size[1].to_i.nonzero? || 80
33-
max_filename_size = terminal_width - progress_bar.size
33+
max_filename_size = (terminal_width - progress_bar.size) - 1
3434

3535
if filename.size > max_filename_size then
3636
# Turn "some_long_filename.rb" to "...ong_filename.rb"

0 commit comments

Comments
 (0)