Using ex, I'm seeing the following odd behavior when entering a comment:

[[[
$ echo blah > foo.txt
$ ex foo.txt

"foo.txt" 1L, 5C
Entering Ex mode.  Type "visual" to go to Normal mode.
:"
E501: At end-of-file
:
]]]

This used to be fine in older versions of vim (say 6.3).  The change
that seems to be responsible would be:

[[[
--- ex_docmd.c  2005/02/12 14:18:27 1.31
+++ ex_docmd.c  2005/02/22 08:32:32 1.32
@@ -1671,7 +1688,10 @@

    /* ignore comment and empty lines */
    if (*ea.cmd == '"' || *ea.cmd == NUL)
+   {
+       ex_pressedreturn = TRUE;
        goto doend;
+   }

 /*
  * 2. handle command modifiers.

]]]

Which is rev 1.32 of vim7/src/ex_docmd.c.  The revlog for 1.32 of
ex_docmd.c is "updated for version 7.0051" which leads me to believe
this is from another patch or repository collection somewhere (not
familiar with how vim's repositories are managed).

I would expect that comments would not trigger an EOF error.  It causes
ex to exit with an error code if you put a comment in script that you
feed in.  It also appears that other versions of ex (FreeBSD, Sun) don't
generate this error.

Thoughts?

- michael


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui