Commit Diff


commit - 4cb3882fc37e82ef668967ce6c12f1d24f558e79
commit + 84892515ec94204f7208e7492a31439f8c0f82e3
blob - 7eac1ea80b9e83a4ba9fc7682a396035f8ab5fa1
blob + 2c73f2f2bc4d359f0c0d2656f433383400dc4a3d
--- downloads.c
+++ downloads.c
@@ -70,7 +70,13 @@ recompute_downloads(void)
 	}
 
 end:
-	wrap_page(&downloadwin, download_lines);
+	/*
+	 * The exact value doesn't matter, as wrap_page only considers
+	 * l->line, which is the human representation of the byte
+	 * counter, and we know for sure is < FMT_SCALED_STRSIZE so it
+	 * fits.
+	 */
+	wrap_page(&downloadwin, download_cols);
 }
 
 void
blob - 6c42e5806cab85597ac2d28fd336ae5f9c539be5
blob + d3daf6676325507906928c647dd44905b605dc83
--- ui.c
+++ ui.c
@@ -98,6 +98,7 @@ static WINDOW		*download;
 /* not static so we can see them from download.c */
 struct buffer		 downloadwin;
 int			 download_lines;
+int			 download_cols;
 
 static int		 side_window;
 static int		 in_side_window;
@@ -343,11 +344,12 @@ rearrange_windows(void)
 
 	if (side_window & SIDE_WINDOW_BOTTOM) {
 		download_lines = MIN(5, lines/2);
+		download_cols = COLS;
 		mvwin(download, lines - download_lines, 0);
-		wresize(download, download_lines, COLS);
+		wresize(download, download_lines, download_cols);
 		lines -= download_lines;
 
-		wrap_page(&downloadwin, COLS);
+		wrap_page(&downloadwin, download_cols);
 	}
 
 	body_lines = show_tab_bar ? --lines : lines;
blob - bdcb4079be72b7857407318281256c69b7c064db
blob + 91f25e72264b4b2b92e490dcce6e798344b7166e
--- ui.h
+++ ui.h
@@ -129,6 +129,7 @@ extern int		 help_lines, help_cols;
 
 extern struct buffer	 downloadwin;
 extern int		 download_lines;
+extern int		 download_cols;
 
 void		 save_excursion(struct excursion *, struct buffer *);
 void		 restore_excursion(struct excursion *, struct buffer *);