patch 8.2.0149: maintaining a Vim9 branch separately is more work
Problem: Maintaining a Vim9 branch separately is more work.
Solution: Merge the Vim9 script changes.
diff --git a/src/message.c b/src/message.c
index 7a6e346..935fd8c 100644
--- a/src/message.c
+++ b/src/message.c
@@ -847,6 +847,17 @@
}
/*
+ * Give an error message which contains %s for "name[len]".
+ */
+ void
+emsg_namelen(char *msg, char_u *name, int len)
+{
+ char_u *copy = vim_strnsave((char_u *)name, len);
+
+ semsg(msg, copy == NULL ? "NULL" : (char *)copy);
+}
+
+/*
* Like msg(), but truncate to a single line if p_shm contains 't', or when
* "force" is TRUE. This truncates in another way as for normal messages.
* Careful: The string may be changed by msg_may_trunc()!