mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
- fix for ^@ in the history
- little cleanup
This commit is contained in:
parent
388c102a57
commit
7195fe8ac7
1 changed files with 4 additions and 2 deletions
|
@ -50,6 +50,7 @@ Con_CreateInputLine (int lines, int width, char prompt)
|
||||||
char *l, **p;
|
char *l, **p;
|
||||||
int size;
|
int size;
|
||||||
inputline_t *inputline;
|
inputline_t *inputline;
|
||||||
|
int i;
|
||||||
|
|
||||||
size = sizeof (inputline_t); // space for the header
|
size = sizeof (inputline_t); // space for the header
|
||||||
size += sizeof (char *[lines]); // space for the line pointers
|
size += sizeof (char *[lines]); // space for the line pointers
|
||||||
|
@ -68,7 +69,8 @@ Con_CreateInputLine (int lines, int width, char prompt)
|
||||||
}
|
}
|
||||||
inputline->prompt_char = prompt;
|
inputline->prompt_char = prompt;
|
||||||
|
|
||||||
inputline->lines[0][0] = prompt;
|
for (i = 0; i < inputline->num_lines; i++)
|
||||||
|
inputline->lines[i][0] = prompt;
|
||||||
inputline->linepos = 1;
|
inputline->linepos = 1;
|
||||||
return inputline;
|
return inputline;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +122,7 @@ Con_ProcessInputLine (inputline_t *il, int ch)
|
||||||
break;
|
break;
|
||||||
case K_UP:
|
case K_UP:
|
||||||
do {
|
do {
|
||||||
il->history_line = (il->history_line - 1) % il->num_lines;
|
il->history_line = il->history_line - 1;
|
||||||
if (il->history_line < 0)
|
if (il->history_line < 0)
|
||||||
il->history_line = il->num_lines - 1;
|
il->history_line = il->num_lines - 1;
|
||||||
} while (il->history_line != il->edit_line
|
} while (il->history_line != il->edit_line
|
||||||
|
|
Loading…
Reference in a new issue