patch 8.2.4833: failure of mapping not checked for

Problem:    Failure of mapping not checked for.
Solution:   Check return value of ins_typebuf(). (closes #10299)
diff --git a/src/term.c b/src/term.c
index 14cee6a..ee8be7f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4531,7 +4531,9 @@
 	    del_typebuf(-extra, offset);
 	else if (extra > 0)
 	    // insert the extra space we need
-	    ins_typebuf(string + slen, REMAP_YES, offset, FALSE, FALSE);
+	    if (ins_typebuf(string + slen, REMAP_YES, offset, FALSE, FALSE)
+								       == FAIL)
+		return FAIL;
 
 	// Careful: del_typebuf() and ins_typebuf() may have reallocated
 	// typebuf.tb_buf[]!