From ba4b6ec4007922f7d6dd355a377781e18e80043f Mon Sep 17 00:00:00 2001
From: James R <justsomejames2@gmail.com>
Date: Wed, 21 Oct 2020 12:34:26 -0700
Subject: [PATCH] Reset wait period for COM_BufInsertText

---
 src/command.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/command.c b/src/command.c
index f84500785..58434ef89 100644
--- a/src/command.c
+++ b/src/command.c
@@ -165,6 +165,8 @@ void COM_BufAddTextEx(const char *ptext, int flags)
   */
 void COM_BufInsertTextEx(const char *ptext, int flags)
 {
+	const INT32 old_wait = com_wait;
+
 	char *temp = NULL;
 	size_t templen;
 
@@ -176,10 +178,14 @@ void COM_BufInsertTextEx(const char *ptext, int flags)
 		VS_Clear(&com_text);
 	}
 
+	com_wait = 0;
+
 	// add the entire text of the file (or alias)
 	COM_BufAddTextEx(ptext, flags);
 	COM_BufExecute(); // do it right away
 
+	com_wait += old_wait;
+
 	// add the copied off data
 	if (templen)
 	{
-- 
GitLab