patch 8.2.4930: interpolated string expression requires escaping
Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
diff --git a/src/alloc.c b/src/alloc.c
index 5218d00..6d4db62 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -832,7 +832,7 @@
/*
* Concatenate a string to a growarray which contains bytes.
- * When "s" is NULL does not do anything.
+ * When "s" is NULL memory allocation fails does not do anything.
* Note: Does NOT copy the NUL at the end!
*/
void
@@ -869,14 +869,14 @@
/*
* Append one byte to a growarray which contains bytes.
*/
- void
+ int
ga_append(garray_T *gap, int c)
{
- if (ga_grow(gap, 1) == OK)
- {
- *((char *)gap->ga_data + gap->ga_len) = c;
- ++gap->ga_len;
- }
+ if (ga_grow(gap, 1) == FAIL)
+ return FAIL;
+ *((char *)gap->ga_data + gap->ga_len) = c;
+ ++gap->ga_len;
+ return OK;
}
#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(MSWIN) \