Anonymous avatar Anonymous committed 14698f6

updated for version 7.3.837
Problem: Empty lines in :version output when 'columns' is 320.
Solution: Simplify the logic of making columns. (Nazri Ramliy, Roland
Eggner)

Comments (0)

Files changed (1)

 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    837,
+/**/
     836,
 /**/
     835,
 	return;
     }
 
-    ncol = (int) Columns / width;
     /* The rightmost column doesn't need a separator.
      * Sacrifice it to fit in one more column if possible. */
-    if (Columns % width == width - 1)
-	ncol++;
-
+    ncol = (int) (Columns + 1) / width;
     nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0);
 
+    /* i counts columns then rows.  idx counts rows then columns. */
     for (i = 0; !got_int && i < nrow * ncol; ++i)
     {
 	int idx = (i / ncol) + (i % ncol) * nrow;
 	    }
 	}
 	else
-	    msg_putchar('\n');
+	{
+	    if (msg_col > 0)
+		msg_putchar('\n');
+	}
     }
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.