aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-24 11:10:01 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-03-24 12:16:39 +0100
commit82cd0be2eaf71c0476e15c66ba3e83c76896d407 (patch)
tree870b2448151069c8ebb825911f032d6c8a1cb4d3 /src/nvim/fileio.c
parent189c5abeba4fb508d879ebbf5fa07965c4092cf2 (diff)
downloadrneovim-82cd0be2eaf71c0476e15c66ba3e83c76896d407.tar.gz
rneovim-82cd0be2eaf71c0476e15c66ba3e83c76896d407.tar.bz2
rneovim-82cd0be2eaf71c0476e15c66ba3e83c76896d407.zip
refactor: eliminate `autocmd_fname_full` global
It's a micro-optimization; check path_is_absolute_path(autocmd_fname) instead. The main optimization (which is still in place) afforded by Vim 7.2.021 was to avoid resolving <afile> when it is not needed.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 4e70daea90..ea214dd38a 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -6655,7 +6655,6 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
char_u *save_sourcing_name;
linenr_T save_sourcing_lnum;
char_u *save_autocmd_fname;
- int save_autocmd_fname_full;
int save_autocmd_bufnr;
char_u *save_autocmd_match;
int save_autocmd_busy;
@@ -6728,7 +6727,6 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
* Save the autocmd_* variables and info about the current buffer.
*/
save_autocmd_fname = autocmd_fname;
- save_autocmd_fname_full = autocmd_fname_full;
save_autocmd_bufnr = autocmd_bufnr;
save_autocmd_match = autocmd_match;
save_autocmd_busy = autocmd_busy;
@@ -6758,7 +6756,6 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
// Allocate MAXPATHL for when eval_vars() resolves the fullpath.
autocmd_fname = vim_strnsave(autocmd_fname, MAXPATHL);
}
- autocmd_fname_full = false; // call FullName_save() later
/*
* Set the buffer number to be used for <abuf>.
@@ -6925,7 +6922,6 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
sourcing_lnum = save_sourcing_lnum;
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_SID = save_current_SID;