mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
make the input line scrolling unsigned int clean
This commit is contained in:
parent
9a40bf2956
commit
d566790c0b
1 changed files with 5 additions and 2 deletions
|
@ -179,12 +179,15 @@ Con_ProcessInputLine (inputline_t *il, int ch)
|
|||
i = il->linepos - 1;
|
||||
if (il->scroll > i)
|
||||
il->scroll = i;
|
||||
if (il->scroll < i - (il->width - 2) + 1)
|
||||
if (il->scroll + (il->width - 2) - 1 < i)
|
||||
il->scroll = i - (il->width - 2) + 1;
|
||||
text = il->lines[il->edit_line] + il->scroll;
|
||||
if (strlen (text + 1) < il->width - 2) {
|
||||
text = il->lines[il->edit_line];
|
||||
il->scroll = strlen (text + 1) - (il->width - 2);
|
||||
if ((i = strlen (text + 1)) > (il->width - 2))
|
||||
il->scroll = i - (il->width - 2);
|
||||
else
|
||||
il->scroll = 0;
|
||||
il->scroll = max (il->scroll, 0);
|
||||
}
|
||||
if (il->draw)
|
||||
|
|
Loading…
Reference in a new issue