comparison src/ex_getln.c @ 831:f24a95dae8ee

updated for version 7.0d05
author vimboss
date Sat, 15 Apr 2006 20:25:09 +0000
parents 01583c79d5f4
children 8bebcabccc2c
comparison
equal deleted inserted replaced
830:927afe5f3c9d 831:f24a95dae8ee
3995 if (retval != NULL) 3995 if (retval != NULL)
3996 { 3996 {
3997 vim_strncpy(retval, fname, len); 3997 vim_strncpy(retval, fname, len);
3998 3998
3999 /* 3999 /*
4000 * Don't add a star to ~, ~user, $var or `cmd`. 4000 * Don't add a star to *, ~, ~user, $var or `cmd`.
4001 * * would become **, which walks the whole tree.
4001 * ~ would be at the start of the file name, but not the tail. 4002 * ~ would be at the start of the file name, but not the tail.
4002 * $ could be anywhere in the tail. 4003 * $ could be anywhere in the tail.
4003 * ` could be anywhere in the file name. 4004 * ` could be anywhere in the file name.
4004 */ 4005 */
4005 tail = gettail(retval); 4006 tail = gettail(retval);
4006 if ((*retval != '~' || tail != retval) 4007 if ((*retval != '~' || tail != retval)
4008 && (len == 0 || retval[len - 1] != '*')
4007 && vim_strchr(tail, '$') == NULL 4009 && vim_strchr(tail, '$') == NULL
4008 && vim_strchr(retval, '`') == NULL) 4010 && vim_strchr(retval, '`') == NULL)
4009 retval[len++] = '*'; 4011 retval[len++] = '*';
4010 retval[len] = NUL; 4012 retval[len] = NUL;
4011 } 4013 }