From 971049f3189d4769db5e9896cd19b555719b3d09 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 7 Jun 2023 09:26:46 +0800 Subject: revert: "refactor: eliminate `autocmd_fname_full` global" This reverts commit 82cd0be2eaf71c0476e15c66ba3e83c76896d407. --- src/nvim/ex_docmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/nvim/ex_docmd.c') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 19ee1d841b..9ea9f28fa5 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -6899,12 +6899,10 @@ char *eval_vars(char *src, const char *srcstart, size_t *usedlen, linenr_T *lnum break; case SPEC_AFILE: // file name for autocommand - if (autocmd_fname != NULL - && !path_is_absolute(autocmd_fname) - // For CmdlineEnter and related events, is not a path! #9348 - && !strequal("/", autocmd_fname)) { + if (autocmd_fname != NULL && !autocmd_fname_full) { // Still need to turn the fname into a full path. It was // postponed to avoid a delay when is not used. + autocmd_fname_full = true; result = FullName_save(autocmd_fname, false); // Copy into `autocmd_fname`, don't reassign it. #8165 xstrlcpy(autocmd_fname, result, MAXPATHL); -- cgit