aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/autocmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-07 09:26:46 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-06-07 09:26:46 +0800
commit971049f3189d4769db5e9896cd19b555719b3d09 (patch)
treec4c7c89553b47221fa0ad61d0ff254987cc2468a /src/nvim/autocmd.c
parent0e0a166a0cc5a2dc199136e313e58c27bfb91977 (diff)
downloadrneovim-971049f3189d4769db5e9896cd19b555719b3d09.tar.gz
rneovim-971049f3189d4769db5e9896cd19b555719b3d09.tar.bz2
rneovim-971049f3189d4769db5e9896cd19b555719b3d09.zip
revert: "refactor: eliminate `autocmd_fname_full` global"
This reverts commit 82cd0be2eaf71c0476e15c66ba3e83c76896d407.
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r--src/nvim/autocmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index 53cca7baa1..564a7b4f87 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -1603,6 +1603,7 @@ bool apply_autocmds_group(event_T event, char *fname, char *fname_io, bool force
// Save the autocmd_* variables and info about the current buffer.
char *save_autocmd_fname = autocmd_fname;
+ bool save_autocmd_fname_full = autocmd_fname_full;
int save_autocmd_bufnr = autocmd_bufnr;
char *save_autocmd_match = autocmd_match;
int save_autocmd_busy = autocmd_busy;
@@ -1631,6 +1632,7 @@ bool apply_autocmds_group(event_T event, char *fname, char *fname_io, bool force
// Allocate MAXPATHL for when eval_vars() resolves the fullpath.
autocmd_fname = xstrnsave(autocmd_fname, MAXPATHL);
}
+ autocmd_fname_full = false; // call FullName_save() later
// Set the buffer number to be used for <abuf>.
autocmd_bufnr = buf == NULL ? 0 : buf->b_fnum;
@@ -1806,6 +1808,7 @@ bool apply_autocmds_group(event_T event, char *fname, char *fname_io, bool force
estack_pop();
xfree(autocmd_fname);
autocmd_fname = save_autocmd_fname;
+ autocmd_fname_full = save_autocmd_fname_full;
autocmd_bufnr = save_autocmd_bufnr;
autocmd_match = save_autocmd_match;
current_sctx = save_current_sctx;