From 08aa9b00237ab45dadeffdf381e0e3c228337e53 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 25 May 2019 17:22:19 -0400 Subject: vim-patch:8.1.0211: expanding a file name "~" results in $HOME Problem: Expanding a file name "~" results in $HOME. (Aidan Shafran) Solution: Change "~" to "./~" before expanding. (closes vim/vim#3072) https://github.com/vim/vim/commit/00136dc321586800986e8f743c2f108f5eecbf92 --- src/nvim/if_cscope.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/if_cscope.c') diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index 4cb0c9a4ae..a033546394 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -425,7 +425,8 @@ cs_add_common( expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL); size_t len = STRLEN(fname); fbuf = (char_u *)fname; - (void)modify_fname((char_u *)":p", &usedlen, (char_u **)&fname, &fbuf, &len); + (void)modify_fname((char_u *)":p", false, &usedlen, + (char_u **)&fname, &fbuf, &len); if (fname == NULL) goto add_err; fname = (char *)vim_strnsave((char_u *)fname, len); -- cgit From 58d6e2d3cc4c39f7a2c78a3060758bee31f831e4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 25 May 2019 20:42:22 -0400 Subject: lint --- src/nvim/if_cscope.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/if_cscope.c') diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index a033546394..84721ee96c 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -427,8 +427,9 @@ cs_add_common( fbuf = (char_u *)fname; (void)modify_fname((char_u *)":p", false, &usedlen, (char_u **)&fname, &fbuf, &len); - if (fname == NULL) + if (fname == NULL) { goto add_err; + } fname = (char *)vim_strnsave((char_u *)fname, len); xfree(fbuf); FileInfo file_info; -- cgit