Skip to content

Commit

Permalink
Merge pull request #669 from aycabta/reduce-1char-for-windows
Browse files Browse the repository at this point in the history
Reduce 1 char from progress output for Windows
  • Loading branch information
aycabta authored Dec 6, 2018
2 parents 8f9f4c1 + a446cb1 commit d212c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdoc/stats/normal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d212c5f

Please sign in to comment.