Your message dated Sun, 24 Feb 2008 15:11:38 -0500
with message-id <[EMAIL PROTECTED]>
has caused the   report #465163,
regarding [vim] command line file name completion triggers terminal freeze + 
100% cpu load
to be marked as having been forwarded to the upstream software
author(s) Bram Moolenaar <[EMAIL PROTECTED]>

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
465163: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465163
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Bram,

Patch 7.1.226 relaxed the restrictions on cmdline completion.  This
can cause Vim to hang while performing cmdline completion if <space> is
added to 'isfname'.

  vim -N -u NONE -c "set isfname+=32"
  :r !ls /<C-l>

An infinite loop happens in set_one_cmd_context as shown by the
following code which I've trimmed down to the relevant path.

        while (*p != NUL)
        {
            [snip]
            /* An argument can contain just about everything, except
             * characters that end the command and white space. */
            else if (c == '|' || c == '\n' || c == '"' || (vim_iswhite(c)
#ifdef SPACE_IN_FILENAME
                                         && (!(ea.argt & NOSPC) || usefilter)
#endif
                    ))
            {
                while (*p != NUL)
                {
                    [snip]
                    if (c == '`' || vim_isfilec_or_wc(c))
                        break;
                    [snip]
**                  mb_ptr_adv(p);
                }
                [snip]
                p -= len;
            }
            mb_ptr_adv(p);
        }

The code never leaves the outer while loop.  It would seem that Vim
either shouldn't be entering the else if branch (and was the previous
behavior) or it shouldn't be breaking out of the inner while loop so
that the ** marked line is run.

What's currently happening is that p is decremented by len (1 in this
case) and then incremented again immediately outside of the inner while
loop.  So Vim loops forever examining the exact same string.

I also have to wonder why os_unix.h doesn't define SPACE_IN_FILENAME.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to