nvi-12-horiz_scroll_count.patch (621B)
1 #! /bin/sh /usr/share/dpatch/dpatch-run 2 ## 12horiz_scroll_count.dpatch by <hesso@pool.math.tu-berlin.de> 3 ## 4 ## DP: No description. 5 6 @DPATCH@ 7 diff -Naur nvi-1.81.6.orig/vi/vs_refresh.c nvi-1.81.6/vi/vs_refresh.c 8 --- nvi-1.81.6.orig/vi/vs_refresh.c 2007-11-18 17:41:42.000000000 +0100 9 +++ nvi-1.81.6/vi/vs_refresh.c 2008-05-01 18:16:01.000000000 +0200 10 @@ -569,7 +569,7 @@ 11 * for the number option offset. 12 */ 13 cnt = vs_columns(sp, NULL, LNO, &CNO, NULL); 14 - if (O_ISSET(sp, O_NUMBER)) 15 + if (O_ISSET(sp, O_NUMBER) && cnt) 16 cnt -= O_NUMBER_LENGTH; 17 18 /* Adjust the window towards the beginning of the line. */