console.c: When toggling the fullscreen console off, clear the current line.

This is consistent with toggling the in-game console off, and fixes stray '`' or '~' (or '^' or '\' or ..., depending on the keyboard layout) characters.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1116 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2014-10-15 06:06:18 +00:00
parent 77e62b4750
commit 05bfe07525
1 changed files with 5 additions and 4 deletions

View File

@ -107,14 +107,15 @@ void Con_ToggleConsole_f (void)
{
if (key_dest == key_console/* || (key_dest == key_game && con_forcedup)*/)
{
key_lines[edit_line][1] = 0; // clear any typing
key_linepos = 1;
con_backscroll = 0; //johnfitz -- toggleconsole should return you to the bottom of the scrollback
history_line = edit_line; //johnfitz -- it should also return you to the bottom of the command history
if (cls.state == ca_connected)
{
IN_Activate();
key_dest = key_game;
key_lines[edit_line][1] = 0; // clear any typing
key_linepos = 1;
con_backscroll = 0; //johnfitz -- toggleconsole should return you to the bottom of the scrollback
history_line = edit_line; //johnfitz -- it should also return you to the bottom of the command history
}
else
{