summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-15 20:25:09 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-15 20:25:09 +0000
commitc6249bb24629c49cfc315ac540a21edf18a61eaf (patch)
tree815229a041a28df27396d1bbe8bfb418a2154928 /src/ex_getln.c
parent01a347a1bb78774a62dd8c251c75a7541b58cdb7 (diff)
updated for version 7.0d05
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 11069f25e5..044429e173 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3997,13 +3997,15 @@ addstar(fname, len, context)
vim_strncpy(retval, fname, len);
/*
- * Don't add a star to ~, ~user, $var or `cmd`.
+ * Don't add a star to *, ~, ~user, $var or `cmd`.
+ * * would become **, which walks the whole tree.
* ~ would be at the start of the file name, but not the tail.
* $ could be anywhere in the tail.
* ` could be anywhere in the file name.
*/
tail = gettail(retval);
if ((*retval != '~' || tail != retval)
+ && (len == 0 || retval[len - 1] != '*')
&& vim_strchr(tail, '$') == NULL
&& vim_strchr(retval, '`') == NULL)
retval[len++] = '*';