|
Karsten Hopp |
8a0800 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
8a0800 |
Subject: patch 7.1.081
|
|
Karsten Hopp |
8a0800 |
Fcc: outbox
|
|
Karsten Hopp |
8a0800 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
8a0800 |
Mime-Version: 1.0
|
|
Karsten Hopp |
8a0800 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
8a0800 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
8a0800 |
------------
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
Patch 7.1.081
|
|
Karsten Hopp |
8a0800 |
Problem: Command line completion for a shell command: "cat </tmp/file<Tab>"
|
|
Karsten Hopp |
8a0800 |
doesn't work.
|
|
Karsten Hopp |
8a0800 |
Solution: Start the file name at any character that can't be in a file name.
|
|
Karsten Hopp |
8a0800 |
(Martin Toft)
|
|
Karsten Hopp |
8a0800 |
Files: src/ex_docmd.c
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
*** ../vim-7.1.080/src/ex_docmd.c Tue Aug 14 22:54:00 2007
|
|
Karsten Hopp |
8a0800 |
--- src/ex_docmd.c Sat Aug 18 14:58:53 2007
|
|
Karsten Hopp |
8a0800 |
***************
|
|
Karsten Hopp |
8a0800 |
*** 3281,3319 ****
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
if (ea.argt & XFILE)
|
|
Karsten Hopp |
8a0800 |
{
|
|
Karsten Hopp |
8a0800 |
! int in_quote = FALSE;
|
|
Karsten Hopp |
8a0800 |
! char_u *bow = NULL; /* Beginning of word */
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
/*
|
|
Karsten Hopp |
8a0800 |
* Allow spaces within back-quotes to count as part of the argument
|
|
Karsten Hopp |
8a0800 |
* being expanded.
|
|
Karsten Hopp |
8a0800 |
*/
|
|
Karsten Hopp |
8a0800 |
xp->xp_pattern = skipwhite(arg);
|
|
Karsten Hopp |
8a0800 |
! for (p = xp->xp_pattern; *p; )
|
|
Karsten Hopp |
8a0800 |
{
|
|
Karsten Hopp |
8a0800 |
! if (*p == '\\' && p[1] != NUL)
|
|
Karsten Hopp |
8a0800 |
++p;
|
|
Karsten Hopp |
8a0800 |
#ifdef SPACE_IN_FILENAME
|
|
Karsten Hopp |
8a0800 |
! else if (vim_iswhite(*p) && (!(ea.argt & NOSPC) || usefilter))
|
|
Karsten Hopp |
8a0800 |
#else
|
|
Karsten Hopp |
8a0800 |
! else if (vim_iswhite(*p))
|
|
Karsten Hopp |
8a0800 |
#endif
|
|
Karsten Hopp |
8a0800 |
{
|
|
Karsten Hopp |
8a0800 |
! p = skipwhite(p);
|
|
Karsten Hopp |
8a0800 |
if (in_quote)
|
|
Karsten Hopp |
8a0800 |
bow = p;
|
|
Karsten Hopp |
8a0800 |
else
|
|
Karsten Hopp |
8a0800 |
xp->xp_pattern = p;
|
|
Karsten Hopp |
8a0800 |
! --p;
|
|
Karsten Hopp |
8a0800 |
! }
|
|
Karsten Hopp |
8a0800 |
! else if (*p == '`')
|
|
Karsten Hopp |
8a0800 |
! {
|
|
Karsten Hopp |
8a0800 |
! if (!in_quote)
|
|
Karsten Hopp |
8a0800 |
! {
|
|
Karsten Hopp |
8a0800 |
! xp->xp_pattern = p;
|
|
Karsten Hopp |
8a0800 |
! bow = p + 1;
|
|
Karsten Hopp |
8a0800 |
! }
|
|
Karsten Hopp |
8a0800 |
! in_quote = !in_quote;
|
|
Karsten Hopp |
8a0800 |
}
|
|
Karsten Hopp |
8a0800 |
mb_ptr_adv(p);
|
|
Karsten Hopp |
8a0800 |
}
|
|
Karsten Hopp |
8a0800 |
--- 3281,3344 ----
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
if (ea.argt & XFILE)
|
|
Karsten Hopp |
8a0800 |
{
|
|
Karsten Hopp |
8a0800 |
! int c;
|
|
Karsten Hopp |
8a0800 |
! int in_quote = FALSE;
|
|
Karsten Hopp |
8a0800 |
! char_u *bow = NULL; /* Beginning of word */
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
/*
|
|
Karsten Hopp |
8a0800 |
* Allow spaces within back-quotes to count as part of the argument
|
|
Karsten Hopp |
8a0800 |
* being expanded.
|
|
Karsten Hopp |
8a0800 |
*/
|
|
Karsten Hopp |
8a0800 |
xp->xp_pattern = skipwhite(arg);
|
|
Karsten Hopp |
8a0800 |
! p = xp->xp_pattern;
|
|
Karsten Hopp |
8a0800 |
! while (*p != NUL)
|
|
Karsten Hopp |
8a0800 |
{
|
|
Karsten Hopp |
8a0800 |
! #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
8a0800 |
! if (has_mbyte)
|
|
Karsten Hopp |
8a0800 |
! c = mb_ptr2char(p);
|
|
Karsten Hopp |
8a0800 |
! else
|
|
Karsten Hopp |
8a0800 |
! #endif
|
|
Karsten Hopp |
8a0800 |
! c = *p;
|
|
Karsten Hopp |
8a0800 |
! if (c == '\\' && p[1] != NUL)
|
|
Karsten Hopp |
8a0800 |
++p;
|
|
Karsten Hopp |
8a0800 |
+ else if (c == '`')
|
|
Karsten Hopp |
8a0800 |
+ {
|
|
Karsten Hopp |
8a0800 |
+ if (!in_quote)
|
|
Karsten Hopp |
8a0800 |
+ {
|
|
Karsten Hopp |
8a0800 |
+ xp->xp_pattern = p;
|
|
Karsten Hopp |
8a0800 |
+ bow = p + 1;
|
|
Karsten Hopp |
8a0800 |
+ }
|
|
Karsten Hopp |
8a0800 |
+ in_quote = !in_quote;
|
|
Karsten Hopp |
8a0800 |
+ }
|
|
Karsten Hopp |
8a0800 |
#ifdef SPACE_IN_FILENAME
|
|
Karsten Hopp |
8a0800 |
! else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter))
|
|
Karsten Hopp |
8a0800 |
#else
|
|
Karsten Hopp |
8a0800 |
! else if (!vim_isfilec(c))
|
|
Karsten Hopp |
8a0800 |
#endif
|
|
Karsten Hopp |
8a0800 |
{
|
|
Karsten Hopp |
8a0800 |
! while (*p != NUL)
|
|
Karsten Hopp |
8a0800 |
! {
|
|
Karsten Hopp |
8a0800 |
! #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
8a0800 |
! if (has_mbyte)
|
|
Karsten Hopp |
8a0800 |
! c = mb_ptr2char(p);
|
|
Karsten Hopp |
8a0800 |
! else
|
|
Karsten Hopp |
8a0800 |
! #endif
|
|
Karsten Hopp |
8a0800 |
! c = *p;
|
|
Karsten Hopp |
8a0800 |
! if (c == '`' || vim_isfilec(c))
|
|
Karsten Hopp |
8a0800 |
! break;
|
|
Karsten Hopp |
8a0800 |
! #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
8a0800 |
! if (has_mbyte)
|
|
Karsten Hopp |
8a0800 |
! len = (*mb_ptr2len)(p);
|
|
Karsten Hopp |
8a0800 |
! else
|
|
Karsten Hopp |
8a0800 |
! #endif
|
|
Karsten Hopp |
8a0800 |
! len = 1;
|
|
Karsten Hopp |
8a0800 |
! mb_ptr_adv(p);
|
|
Karsten Hopp |
8a0800 |
! }
|
|
Karsten Hopp |
8a0800 |
if (in_quote)
|
|
Karsten Hopp |
8a0800 |
bow = p;
|
|
Karsten Hopp |
8a0800 |
else
|
|
Karsten Hopp |
8a0800 |
xp->xp_pattern = p;
|
|
Karsten Hopp |
8a0800 |
! p -= len;
|
|
Karsten Hopp |
8a0800 |
}
|
|
Karsten Hopp |
8a0800 |
mb_ptr_adv(p);
|
|
Karsten Hopp |
8a0800 |
}
|
|
Karsten Hopp |
8a0800 |
*** ../vim-7.1.080/src/version.c Sat Aug 18 16:59:43 2007
|
|
Karsten Hopp |
8a0800 |
--- src/version.c Sat Aug 18 17:45:54 2007
|
|
Karsten Hopp |
8a0800 |
***************
|
|
Karsten Hopp |
8a0800 |
*** 668,669 ****
|
|
Karsten Hopp |
8a0800 |
--- 668,671 ----
|
|
Karsten Hopp |
8a0800 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
8a0800 |
+ /**/
|
|
Karsten Hopp |
8a0800 |
+ 81,
|
|
Karsten Hopp |
8a0800 |
/**/
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
--
|
|
Karsten Hopp |
8a0800 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
8a0800 |
194. Your business cards contain your e-mail and home page address.
|
|
Karsten Hopp |
8a0800 |
|
|
Karsten Hopp |
8a0800 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
8a0800 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
8a0800 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
8a0800 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|