Patch 8.2.1747
Problem: Result of expand() unexpectedly depends on 'completeslash'.
Solution: Temporarily reset 'completeslash'. (Yasuhiro Matsumoto,
closes #7021)
Files: src/evalfunc.c, src/testdir/test_ins_complete.vim
*** ../vim-8.2.1746/src/evalfunc.c 2020-09-25 22:42:43.852669232 +0200
--- src/evalfunc.c 2020-09-26 18:43:42.820536179 +0200
***************
*** 2436,2441 ****
--- 2436,2447 ----
expand_T xpc;
int error = FALSE;
char_u *result;
+ #ifdef BACKSLASH_IN_FILENAME
+ char_u *p_csl_save = p_csl;
+
+ // avoid using 'completeslash' here
+ p_csl = empty_option;
+ #endif
rettv->v_type = VAR_STRING;
if (argvars[1].v_type != VAR_UNKNOWN
***************
*** 2488,2493 ****
--- 2494,2502 ----
else
rettv->vval.v_string = NULL;
}
+ #ifdef BACKSLASH_IN_FILENAME
+ p_csl = p_csl_save;
+ #endif
}
/*
*** ../vim-8.2.1746/src/testdir/test_ins_complete.vim 2020-09-12
22:52:53.582315764 +0200
--- src/testdir/test_ins_complete.vim 2020-09-26 18:46:09.301291420 +0200
***************
*** 363,374 ****
" Test for insert path completion with completeslash option
func Test_ins_completeslash()
CheckMSWindows
!
call mkdir('Xdir')
let orig_shellslash = &shellslash
set cpt&
new
!
set noshellslash
set completeslash=
--- 363,374 ----
" Test for insert path completion with completeslash option
func Test_ins_completeslash()
CheckMSWindows
!
call mkdir('Xdir')
let orig_shellslash = &shellslash
set cpt&
new
!
set noshellslash
set completeslash=
***************
*** 654,657 ****
--- 654,670 ----
close!
endfunc
+ func Test_issue_7021()
+ CheckMSWindows
+
+ let orig_shellslash = &shellslash
+ set noshellslash
+
+ set completeslash=slash
+ call assert_false(expand('~') =~ '/')
+
+ let &shellslash = orig_shellslash
+ set completeslash=
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.1746/src/version.c 2020-09-26 17:20:49.693186820 +0200
--- src/version.c 2020-09-26 18:46:40.705417880 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1747,
/**/
--
I used to be indecisive, now I'm not sure.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202009261647.08QGlcWr811622%40masaka.moolenaar.net.