forked from aniani/vim
patch 8.1.0614: placing signs can be complicated
Problem: Placing signs can be complicated. Solution: Add functions for defining and placing signs. Introduce a group name to avoid different plugins using the same signs. (Yegappan Lakshmanan, closes #3652)
This commit is contained in:
13
src/misc2.c
13
src/misc2.c
@@ -894,6 +894,19 @@ alloc_clear(unsigned size)
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as alloc_clear() but with allocation id for testing
|
||||
*/
|
||||
char_u *
|
||||
alloc_clear_id(unsigned size, alloc_id_T id UNUSED)
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
if (alloc_fail_id == id && alloc_does_fail((long_u)size))
|
||||
return NULL;
|
||||
#endif
|
||||
return alloc_clear(size);
|
||||
}
|
||||
|
||||
/*
|
||||
* alloc() with check for maximum line length
|
||||
*/
|
||||
|
Reference in New Issue
Block a user