Mercurial > vim
comparison src/misc2.c @ 15209:3a99b2e6d136 v8.1.0614
patch 8.1.0614: placing signs can be complicated
commit https://github.com/vim/vim/commit/162b71479bd4dcdb3a2ef9198a1444f6f99e6843
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 21 15:17:36 2018 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Dec 2018 15:30:07 +0100 |
parents | 2d8c31ae1e24 |
children | de63593896b3 |
comparison
equal
deleted
inserted
replaced
15208:acf68008ca43 | 15209:3a99b2e6d136 |
---|---|
890 | 890 |
891 p = lalloc((long_u)size, TRUE); | 891 p = lalloc((long_u)size, TRUE); |
892 if (p != NULL) | 892 if (p != NULL) |
893 (void)vim_memset(p, 0, (size_t)size); | 893 (void)vim_memset(p, 0, (size_t)size); |
894 return p; | 894 return p; |
895 } | |
896 | |
897 /* | |
898 * Same as alloc_clear() but with allocation id for testing | |
899 */ | |
900 char_u * | |
901 alloc_clear_id(unsigned size, alloc_id_T id UNUSED) | |
902 { | |
903 #ifdef FEAT_EVAL | |
904 if (alloc_fail_id == id && alloc_does_fail((long_u)size)) | |
905 return NULL; | |
906 #endif | |
907 return alloc_clear(size); | |
895 } | 908 } |
896 | 909 |
897 /* | 910 /* |
898 * alloc() with check for maximum line length | 911 * alloc() with check for maximum line length |
899 */ | 912 */ |