Merge pull request #13237 from janlazo/vim-8.2.1959

vim-patch:8.1.2422,8.2.{1959,1961,1962,1963}
This commit is contained in:
Jan Edmund Lazo
2020-11-06 22:15:10 -05:00
committed by GitHub
4 changed files with 16 additions and 4 deletions

View File

@@ -5416,7 +5416,7 @@ char_u *buf_spname(buf_T *buf)
return (char_u *)_("[Scratch]");
}
if (buf->b_fname == NULL) {
return (char_u *)_("[No Name]");
return buf_get_fname(buf);
}
return NULL;
}
@@ -5477,6 +5477,16 @@ int buf_signcols(buf_T *buf)
return buf->b_signcols;
}
// Get "buf->b_fname", use "[No Name]" if it is NULL.
char_u *buf_get_fname(const buf_T *buf)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
{
if (buf->b_fname == NULL) {
return (char_u *)_("[No Name]");
}
return buf->b_fname;
}
/*
* Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
*/

View File

@@ -1358,7 +1358,8 @@ void tv_dict_item_remove(dict_T *const dict, dictitem_T *const item)
//{{{2 Alloc/free
/// Allocate an empty dictionary
/// Allocate an empty dictionary.
/// Caller should take care of the reference count.
///
/// @return [allocated] new dictionary.
dict_T *tv_dict_alloc(void)

View File

@@ -301,7 +301,8 @@ struct funccall_S {
int dbg_tick; ///< Debug_tick when breakpoint was set.
int level; ///< Top nesting level of executed function.
proftime_T prof_child; ///< Time spent in a child.
funccall_T *caller; ///< Calling function or NULL.
funccall_T *caller; ///< Calling function or NULL; or next funccal in
///< list pointed to by previous_funccal.
int fc_refcount; ///< Number of user functions that reference this funccall.
int fc_copyID; ///< CopyID used for garbage collection.
garray_T fc_funcs; ///< List of ufunc_T* which keep a reference to "func".

View File

@@ -243,7 +243,7 @@ func s:feedkeys(timer)
call feedkeys('x', 'nt')
endfunc
" Get $VIMPROG to run Vim executable.
" Get $VIMPROG to run the Vim executable.
" The Makefile writes it as the first line in the "vimcmd" file.
" Nvim: uses $NVIM_TEST_ARG0.
func GetVimProg()