On Sa, 26 Dez 2015, Julien Pivard wrote:
> I started Vim start with `vim -u NONE` (to be sure it's a bug, and not caused
> by my config) and `set nocompatible`, `set wildmenu`
>
> When press tab after typed `:!/` suggestion are duplicate like this :
> 
> and this :
> 
>
> But no probleme in insert mode with `<CTRL-X><CTRL-F>`
> 
Here is a patch, including a test.
Best,
Christian
--
Man spricht und dichtet viel eher von der Leerheit und Nichtigkeit des
Lebens, als man sie kennt; man spricht ungern oder nicht freudig
davon, wenn man sie kennt.
-- Jean Paul
--
--
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].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_getln.c b/src/ex_getln.c
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4953,7 +4953,11 @@ expand_shellcmd(filepat, num_file, file,
did_curdir = TRUE;
if (*s == ' ')
+ {
++s; /* Skip space used for absolute path name. */
+ /* do not try to find in current directory again */
+ did_curdir = TRUE;
+ }
#if defined(MSDOS) || defined(MSWIN)
e = vim_strchr(s, ';');
diff --git a/src/testdir/test_expand.vim b/src/testdir/test_expand.vim
--- a/src/testdir/test_expand.vim
+++ b/src/testdir/test_expand.vim
@@ -39,3 +39,12 @@ func Test_with_tilde()
call delete('Xdir ~ dir', 'd')
call assert_false(isdirectory('Xdir ~ dir'))
endfunc
+
+func Test_expand_absolute_path()
+ set nocp wildmode=list
+ cmap ab !<c-r>=getcwd()<cr><c-a><c-r>=setbufvar('%','prompt',getcmdline())<cr>
+ norm :ab
+ call assert_equal('!/home/chrisbra/code/vim/src/testdir/', b:prompt)
+ cunmap ab
+ set cp wildmode&vi
+endfunc