From 6c989c7131d3d4f40f8d708ee47943efce9e5dcd Mon Sep 17 00:00:00 2001 From: Tom Li Date: Sun, 16 Nov 2014 12:03:10 +0530 Subject: [PATCH] Scroll to last character of filename in progress --- src/ChangeLog | 5 +++++ src/progress.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index d085953d..b7f20b39 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-11-16 Tom Li + + * progress.c (create_image): Ensure that the last character of the filename + is scrolled to + 2014-11-15 Darshit Shah * progress.c (create_image): Fix assertion that checks progress bar length diff --git a/src/progress.c b/src/progress.c index d23654da..f8137142 100644 --- a/src/progress.c +++ b/src/progress.c @@ -965,7 +965,7 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done) int *cols_ret = &col; if (((orig_filename_cols > MAX_FILENAME_COLS) && !opt.noscroll) && !done) - offset_cols = ((int) bp->tick) % (orig_filename_cols - MAX_FILENAME_COLS); + offset_cols = ((int) bp->tick) % (orig_filename_cols - MAX_FILENAME_COLS + 1); else offset_cols = 0; offset_bytes = cols_to_bytes (bp->f_download, offset_cols, cols_ret);