mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 18:11:47 +00:00
refactor: remove dead code, adjust comment
Removed code doesn't seem to do anything? Looks like a clobbered remnant from
when do_filetype_autocmd lived in did_set_string_option.
Doc comment for wipe_buffer doesn't decrement top_file_num since a2d25b7 (2016),
which presumably means the comment on marks doesn't apply either. (fmark_T::fnum
can't refer to the wrong buffer as numbers aren't reused here anymore)
This commit is contained in:
@@ -2737,7 +2737,6 @@ void do_filetype_autocmd(buf_T *buf, bool force)
|
||||
return; // disallow recursion
|
||||
}
|
||||
|
||||
char **varp = &buf->b_p_ft;
|
||||
int secure_save = secure;
|
||||
|
||||
// Reset the secure flag, since the value of 'filetype' has
|
||||
@@ -2751,9 +2750,5 @@ void do_filetype_autocmd(buf_T *buf, bool force)
|
||||
apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, buf->b_fname, force || ft_recursive == 1, buf);
|
||||
ft_recursive--;
|
||||
|
||||
// Just in case the old "buf" is now invalid
|
||||
if (varp != &(buf->b_p_ft)) {
|
||||
varp = NULL;
|
||||
}
|
||||
secure = secure_save;
|
||||
}
|
||||
|
||||
@@ -4141,10 +4141,7 @@ bool buf_contents_changed(buf_T *buf)
|
||||
return differ;
|
||||
}
|
||||
|
||||
/// Wipe out a buffer and decrement the last buffer number if it was used for
|
||||
/// this buffer. Call this to wipe out a temp buffer that does not contain any
|
||||
/// marks.
|
||||
///
|
||||
/// Wipe out a (typically temporary) buffer.
|
||||
/// @param aucmd When true trigger autocommands.
|
||||
void wipe_buffer(buf_T *buf, bool aucmd)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user