mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.0232
This commit is contained in:
22
src/regexp.c
22
src/regexp.c
@@ -6854,6 +6854,23 @@ vim_regsub_both(source, dest, copy, magic, backslash)
|
||||
}
|
||||
if (no < 0) /* Ordinary character. */
|
||||
{
|
||||
if (c == K_SPECIAL && src[0] != NUL && src[1] != NUL)
|
||||
{
|
||||
/* Copy a specialy key as-is. */
|
||||
if (copy)
|
||||
{
|
||||
*dst++ = c;
|
||||
*dst++ = *src++;
|
||||
*dst++ = *src++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dst += 3;
|
||||
src += 2;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == '\\' && *src != NUL)
|
||||
{
|
||||
/* Check for abbreviations -- webb */
|
||||
@@ -6877,13 +6894,12 @@ vim_regsub_both(source, dest, copy, magic, backslash)
|
||||
c = *src++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Write to buffer, if copy is set. */
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
else if (has_mbyte)
|
||||
c = mb_ptr2char(src - 1);
|
||||
#endif
|
||||
|
||||
/* Write to buffer, if copy is set. */
|
||||
if (func == (fptr_T)NULL) /* just copy */
|
||||
cc = c;
|
||||
else
|
||||
|
Reference in New Issue
Block a user