[client] Use correct width for input lines

con_linewidt starts out as 0, which leads to bad results for the initial
widths of input lines and later calculations. However, really, they
probably shouldn't be using size_t for the width, but this is a nice
quick fix.
This commit is contained in:
Bill Currie 2023-07-14 07:04:57 +09:00
parent cc57d2bc5b
commit fa1d8ff552

View file

@ -1140,6 +1140,8 @@ C_Init (void)
con_setfitpic (console_view, conback); con_setfitpic (console_view, conback);
} }
con_linewidth = 320 / 8;
cmd_line.prompt = ""; cmd_line.prompt = "";
cmd_line.input_line = Con_CreateInputLine (32, MAXCMDLINE, ']'); cmd_line.input_line = Con_CreateInputLine (32, MAXCMDLINE, ']');
cmd_line.input_line->complete = Con_BasicCompleteCommandLine; cmd_line.input_line->complete = Con_BasicCompleteCommandLine;
@ -1166,7 +1168,6 @@ C_Init (void)
con_setinput (say_view, &say_line); con_setinput (say_view, &say_line);
con_setinput (command_view, &cmd_line); con_setinput (command_view, &cmd_line);
view_pos_t len; view_pos_t len;
len = View_GetLen (buffer_view); len = View_GetLen (buffer_view);