r531 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 3 19:28:57 EST 2006


Author: tma
Date: 2006-02-03 19:28:57 -0500 (Fri, 03 Feb 2006)
New Revision: 531

Modified:
   trunk/code/client/cl_keys.c
Log:
* Reimplement console history recall "bug" behaviour without the bug


Modified: trunk/code/client/cl_keys.c
===================================================================
--- trunk/code/client/cl_keys.c	2006-01-28 23:26:23 UTC (rev 530)
+++ trunk/code/client/cl_keys.c	2006-02-04 00:28:57 UTC (rev 531)
@@ -548,9 +548,13 @@
 
 	if ( (key == K_MWHEELDOWN && keys[K_SHIFT].down) || ( key == K_DOWNARROW ) || ( key == K_KP_DOWNARROW ) ||
 		 ( ( tolower(key) == 'n' ) && keys[K_CTRL].down ) ) {
-		if (historyLine + 1 == nextHistoryLine)
+		historyLine++;
+		if (historyLine >= nextHistoryLine) {
+			historyLine = nextHistoryLine;
+			Field_Clear( &g_consoleField );
+			g_consoleField.widthInChars = g_console_field_width;
 			return;
-		historyLine++;
+		}
 		g_consoleField = historyEditLines[ historyLine % COMMAND_HISTORY ];
 		return;
 	}




More information about the quake3-commits mailing list