]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
cmd: read only one line per frame from stdin
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 3 Jan 2024 03:29:39 +0000 (13:29 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 3 Jan 2024 19:48:07 +0000 (05:48 +1000)
Prioritising the ordering of new commands with respect to existing
commands, over the ordering of pasted commands that include `wait`.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
cmd.c

diff --git a/cmd.c b/cmd.c
index 1d92cadcc7e59595db5a66cd950b6756e1459d01..8c6c2eaa3344cd7efd97d940c00a803454dcbd9e 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -430,14 +430,6 @@ static void Cbuf_Frame_Input(void)
                // bones_was_here: prepending allows a loop such as `alias foo "bar; wait; foo"; foo`
                // to be broken with an alias or unalias command
                Cbuf_InsertText(cmd_local, line);
-               /* appending subsequent lines allows this test to pass (if pasted with proper \n):
-                * wait; echo a
-                * wait
-                * echo b
-                * echo c
-                */
-               while ((line = Sys_ConsoleInput()))
-                       Cbuf_AddText(cmd_local, line);
        }
 }