neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b7d09695c4107bfbe03e9755f22e65027a8b18c2
parent b649a96fc09fa7f18a988b0b0be5dadb54ad49de
Author: Lewis Russell <lewis6991@gmail.com>
Date:   Mon, 30 Jan 2023 13:02:50 +0000

refactor(fileio.c): refactor match_file_path()

Diffstat:
Msrc/nvim/fileio.c | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c @@ -5363,13 +5363,7 @@ bool match_file_pat(char *pattern, regprog_T **prog, char *fname, char *sfname, bool result = false; regmatch.rm_ic = p_fic; // ignore case if 'fileignorecase' is set - { - if (prog != NULL) { - regmatch.regprog = *prog; - } else { - regmatch.regprog = vim_regcomp(pattern, RE_MAGIC); - } - } + regmatch.regprog = prog != NULL ? *prog : vim_regcomp(pattern, RE_MAGIC); // Try for a match with the pattern with: // 1. the full file name, when the pattern has a '/'.