[PATCH] Completion output tidy up

- Fix the case where an extra blank line would be printed at the bottom of a
  list by Con_ShowList.
- Re-print the current command line before outputting a completion list.

diff -urN a/common/console.c head/common/console.c
--- a/common/console.c	2006-02-19 15:48:53.000000000 +1030
+++ head/common/console.c	2006-02-25 14:33:41.000000000 +1030
@@ -677,12 +677,12 @@
     /* Lay them out in columns */
     line = Z_Malloc(Con_GetWidth() + 1);
     cols = Con_GetWidth() / (maxlen + 2);
-    rows = cnt / cols + 1;
+    rows = cnt / cols + ((cnt % cols) ? 1 : 0);
 
     /* Looks better if we have a few rows before spreading out */
     if (rows < 5) {
-	cols = cnt / 5 + 1;
-	rows = cnt / cols + 1;
+	cols = cnt / 5 + ((cnt % 5) ? 1 : 0);
+	rows = cnt / cols + ((cnt % cols) ? 1 : 0);
     }
 
     for (i = 0; i < rows; ++i) {
diff -urN a/common/keys.c head/common/keys.c
--- a/common/keys.c	2006-02-25 13:57:46.000000000 +1030
+++ head/common/keys.c	2006-02-25 14:27:22.000000000 +1030
@@ -263,7 +263,8 @@
 
     root = Cmd_CommandCompletions(s);
     if (root && root->entries) {
-	Con_Printf("%u possible completions:\n", root->entries);
+	Con_Printf("%s\n", key_lines[edit_line]);
+	//Con_Printf("%u possible completions:\n", root->entries);
 	Con_ShowTree(root);
 	Z_Free(root);
     } else {
@@ -283,6 +284,7 @@
 
 		root = Cmd_ArgCompletions(cmd, s);
 		if (root && root->entries) {
+		    Con_Printf("%s\n", key_lines[edit_line]);
 		    Con_ShowTree(root);
 		    Z_Free(root);
 		}
