Do not let previous wait commands affect COM_BufInsertText
COM_BufInsertText("wait 2");
COM_BufInsertText("echo 1; echo 2");
Old behavior: echo 1; wait; echo 2
New behavior: echo 1; echo 2; wait 2
COM_BufInsertText("wait 2");
COM_BufInsertText("echo 1; echo 2");
Old behavior: echo 1; wait; echo 2
New behavior: echo 1; echo 2; wait 2