Commit 239f6369e4a11a75b523925b9910bd3a0505e478

Stefan Sperling 2019-09-08T13:07:54

fix line-wrap for lines spanning the terminal in tog diff view

diff --git a/tog/tog.c b/tog/tog.c
index f6da9f4..287db60 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2393,7 +2393,7 @@ draw_file(struct tog_view *view, FILE *f, int *first_displayed_line,
 		waddwstr(view->window, wline);
 		if (view_needs_focus_indication(view))
 			wstandend(view->window);
-		if (width < view->ncols - 1)
+		if (width <= view->ncols - 1)
 			waddch(view->window, '\n');
 
 		if (max_lines <= 1)
@@ -2419,7 +2419,7 @@ draw_file(struct tog_view *view, FILE *f, int *first_displayed_line,
 			return err;
 		}
 		waddwstr(view->window, wline);
-		if (width < view->ncols - 1)
+		if (width <= view->ncols - 1)
 			waddch(view->window, '\n');
 		if (++nprinted == 1)
 			*first_displayed_line = nlines;