diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-10 18:45:26 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-10 18:45:26 +0100 |
commit | d23a823669d93fb2a570a039173eefe4856ac806 (patch) | |
tree | 617130258eae70e3bd7ef7b6da9c494ffee7b572 /src/edit.c | |
parent | 42443c7d7fecc3a2a72154bb6139b028438617c2 (diff) | |
download | vim-git-d23a823669d93fb2a570a039173eefe4856ac806.tar.gz |
patch 8.0.1496: clearing a pointer takes two linesv8.0.1496
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/edit.c b/src/edit.c index 7074f2648..f0e5c5185 100644 --- a/src/edit.c +++ b/src/edit.c @@ -2939,7 +2939,7 @@ ins_compl_del_pum(void) if (compl_match_array != NULL) { pum_undisplay(); - vim_clear((void **)&compl_match_array); + VIM_CLEAR(compl_match_array); } } @@ -3441,8 +3441,8 @@ ins_compl_free(void) compl_T *match; int i; - vim_clear((void **)&compl_pattern); - vim_clear((void **)&compl_leader); + VIM_CLEAR(compl_pattern); + VIM_CLEAR(compl_leader); if (compl_first_match == NULL) return; @@ -3474,10 +3474,10 @@ ins_compl_clear(void) compl_cont_status = 0; compl_started = FALSE; compl_matches = 0; - vim_clear((void **)&compl_pattern); - vim_clear((void **)&compl_leader); + VIM_CLEAR(compl_pattern); + VIM_CLEAR(compl_leader); edit_submode_extra = NULL; - vim_clear((void **)&compl_orig_text); + VIM_CLEAR(compl_orig_text); compl_enter_selects = FALSE; /* clear v:completed_item */ set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED)); @@ -5584,8 +5584,8 @@ ins_complete(int c, int enable_pum) if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) { - vim_clear((void **)&compl_pattern); - vim_clear((void **)&compl_orig_text); + VIM_CLEAR(compl_pattern); + VIM_CLEAR(compl_orig_text); return FAIL; } @@ -7214,9 +7214,9 @@ set_last_insert(int c) void free_last_insert(void) { - vim_clear((void **)&last_insert); + VIM_CLEAR(last_insert); # ifdef FEAT_INS_EXPAND - vim_clear((void **)&compl_orig_text); + VIM_CLEAR(compl_orig_text); # endif } #endif @@ -7844,7 +7844,7 @@ mb_replace_pop_ins(int cc) static void replace_flush(void) { - vim_clear((void **)&replace_stack); + VIM_CLEAR(replace_stack); replace_stack_len = 0; replace_stack_nr = 0; } |