mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.0.1496: clearing a pointer takes two lines
Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
This commit is contained in:
@@ -580,8 +580,7 @@ nb_free(void)
|
||||
buf.bufp->b_was_netbeans_file = FALSE;
|
||||
}
|
||||
}
|
||||
vim_free(buf_list);
|
||||
buf_list = NULL;
|
||||
VIM_CLEAR(buf_list);
|
||||
buf_list_size = 0;
|
||||
buf_list_used = 0;
|
||||
|
||||
@@ -1477,8 +1476,7 @@ nb_do_cmd(
|
||||
EMSG("E636: invalid buffer identifier in create");
|
||||
return FAIL;
|
||||
}
|
||||
vim_free(buf->displayname);
|
||||
buf->displayname = NULL;
|
||||
VIM_CLEAR(buf->displayname);
|
||||
|
||||
netbeansReadFile = 0; /* don't try to open disk file */
|
||||
do_ecmd(0, NULL, 0, 0, ECMD_ONE, ECMD_HIDE + ECMD_OLDBUF, curwin);
|
||||
@@ -3447,8 +3445,7 @@ print_read_msg(nbbuf_T *buf)
|
||||
msg_add_lines(c, (long)lnum, nchars);
|
||||
|
||||
/* Now display it */
|
||||
vim_free(keep_msg);
|
||||
keep_msg = NULL;
|
||||
VIM_CLEAR(keep_msg);
|
||||
msg_scrolled_ign = TRUE;
|
||||
msg_trunc_attr(IObuff, FALSE, 0);
|
||||
msg_scrolled_ign = FALSE;
|
||||
@@ -3475,8 +3472,7 @@ print_save_msg(nbbuf_T *buf, off_T nchars)
|
||||
msg_add_lines(c, buf->bufp->b_ml.ml_line_count,
|
||||
buf->bufp->b_orig_size);
|
||||
|
||||
vim_free(keep_msg);
|
||||
keep_msg = NULL;
|
||||
VIM_CLEAR(keep_msg);
|
||||
msg_scrolled_ign = TRUE;
|
||||
p = msg_trunc_attr(IObuff, FALSE, 0);
|
||||
if ((msg_scrolled && !need_wait_return) || !buf->initDone)
|
||||
|
Reference in New Issue
Block a user