aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorJurica Bradarić <jbradaric@users.noreply.github.com>2019-10-06 05:35:48 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-10-05 20:35:48 -0700
commitfe074611cd5b3319a3f639f68289df6a718e64eb (patch)
treef6709dc199d929ddeb75e98b74e74a894b4b5c6c /src/nvim/ex_cmds.c
parent1396cc9abb0dfcdbd9572706235aba59f7c3318a (diff)
downloadrneovim-fe074611cd5b3319a3f639f68289df6a718e64eb.tar.gz
rneovim-fe074611cd5b3319a3f639f68289df6a718e64eb.tar.bz2
rneovim-fe074611cd5b3319a3f639f68289df6a718e64eb.zip
vim-patch:8.1.1371: cannot recover from a swap file #11081
Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 16487ce447..a3a08a5884 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -5023,7 +5023,7 @@ void fix_help_buffer(void)
copy_option_part(&p, NameBuff, MAXPATHL, ",");
char_u *const rt = (char_u *)vim_getenv("VIMRUNTIME");
if (rt != NULL
- && path_full_compare(rt, NameBuff, false) != kEqualFiles) {
+ && path_full_compare(rt, NameBuff, false, true) != kEqualFiles) {
int fcount;
char_u **fnames;
char_u *s;
@@ -5233,7 +5233,7 @@ static void helptags_one(char_u *const dir, const char_u *const ext,
ga_init(&ga, (int)sizeof(char_u *), 100);
if (add_help_tags
|| path_full_compare((char_u *)"$VIMRUNTIME/doc",
- dir, false) == kEqualFiles) {
+ dir, false, true) == kEqualFiles) {
s = xmalloc(18 + STRLEN(tagfname));
sprintf((char *)s, "help-tags\t%s\t1\n", tagfname);
GA_APPEND(char_u *, &ga, s);