mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.1959: crash when terminal buffer name is made empty
Problem: Crash when terminal buffer name is made empty. (Dhiraj Mishra) Solution: Fall back to "[No Name]". (closes vim/vim#7262)00806bceb6
N/A patches for version.c: vim-patch:8.1.2422: "make depend" does not work correctly for libvterm Problem: "make depend" does not work correctly for libvterm. Solution: Fix build dependencies. And a few minor improvements.9810cfbe55
vim-patch:8.2.1962: netbeans may access freed memory Problem: Netbeans may access freed memory. Solution: Check the buffer pointer is still valid. Add a test. (Yegappan Lakshmanan, closes vim/vim#7248)32e5ec0b01
vim-patch:8.2.1963: crash when using a popup window with "latin1" encoding Problem: Crash when using a popup window with "latin1" encoding. Solution: Don't use ScreenLinesUC when enc_utf8 is false. (closes vim/vim#7241)927495b1fe
This commit is contained in:
parent
40a742725c
commit
0522962f15
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user