summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index d906d788..f528b964 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -6939,6 +6939,25 @@ replace_push(c)
++replace_stack_nr;
}
+#if defined(FEAT_MBYTE) || defined(PROTO)
+/*
+ * Push a character onto the replace stack. Handles a multi-byte character in
+ * reverse byte order, so that the first byte is popped off first.
+ * Return the number of bytes done (includes composing characters).
+ */
+ int
+replace_push_mb(p)
+ char_u *p;
+{
+ int l = (*mb_ptr2len)(p);
+ int j;
+
+ for (j = l - 1; j >= 0; --j)
+ replace_push(p[j]);
+ return l;
+}
+#endif
+
#if 0
/*
* call replace_push(c) with replace_offset set to the first NUL.