diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-02-22 19:14:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-02-22 19:14:54 +0100 |
commit | c666388367282c3c7d1d7af24883cfa0d40b046e (patch) | |
tree | f31f3b2331a5c9849c5694f855884e09966126c2 /src/textprop.c | |
parent | 882d02eeb571a13a502fe82a04c9eaffa630c294 (diff) | |
download | vim-git-c666388367282c3c7d1d7af24883cfa0d40b046e.tar.gz |
patch 8.1.0975: using STRNCPY() wrongly. Warning for uninitialized variablev8.1.0975
Problem: Using STRNCPY() wrongly. Warning for uninitialized variable.
Solution: Use mch_memmove(). Initialize variable. (Yasuhiro Matsumoto,
closes #3979)
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c index 637ee7f39..674faebe2 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -17,6 +17,7 @@ * Text properties have a type, which can be used to specify highlighting. * * TODO: + * - When using 'cursorline' attributes should be merged. (#3912) * - Adjust text property column and length when text is inserted/deleted. * -> a :substitute with a multi-line match * -> search for changed_bytes() from misc1.c @@ -27,7 +28,10 @@ * the index, like DB_MARKED? * - Also test line2byte() with many lines, so that ml_updatechunk() is taken * into account. - * - add mechanism to keep track of changed lines. + * - Add mechanism to keep track of changed lines, so that plugin can update + * text properties in these. + * - Perhaps have a window-local option to disable highlighting from text + * properties? */ #include "vim.h" @@ -158,7 +162,7 @@ f_prop_add(typval_T *argvars, typval_T *rettv UNUSED) char_u *newtext; int proplen; size_t textlen; - char_u *props; + char_u *props = NULL; char_u *newprops; textprop_T tmp_prop; int i; |