forked from aniani/vim
patch 8.1.0654: when deleting a line text property flags are not adjusted
Problem: When deleting a line text property flags are not adjusted. Solution: Adjust text property flags in preceding and following lines.
This commit is contained in:
14
src/misc2.c
14
src/misc2.c
@@ -1350,6 +1350,20 @@ vim_strnsave(char_u *string, int len)
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy "p[len]" into allocated memory, ignoring NUL characters.
|
||||
* Returns NULL when out of memory.
|
||||
*/
|
||||
char_u *
|
||||
vim_memsave(char_u *p, int len)
|
||||
{
|
||||
char_u *ret = alloc((unsigned)len);
|
||||
|
||||
if (ret != NULL)
|
||||
mch_memmove(ret, p, (size_t)len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as vim_strsave(), but any characters found in esc_chars are preceded
|
||||
* by a backslash.
|
||||
|
Reference in New Issue
Block a user