Tom M wrote:

> First of all, thank you for VIM. Now, I'd like to share an example of
> a rather confusing behaviour. It's the ':file' ex command when used in
> combination with the # register. Here is how to reproduce:
> 
> vim -N -u NONE -U NONE --noplugin somefile.txt
> 
> :file
> =>
> "somefile.txt"
> 
> :file <CTRL-R>#
> =>
> :file "
> E23: No alternate file
> :file |
> (vim still in ex cmd input mode with the cursor positioned where '|' is)
> 
> otherfile.txt
> (this finishes the input of ':file otherfile.txt' ex command.)
> 
> :file
> =>
> "somefile.txt"
> 
> IOW the resulting 'file otherfile.txt' command failed without warning. Is 
> this a bug or a "feature"? Because this definitely doesn't feel right. I 
> would expect one of these results (in my order of preference):
> 
> 1) The 'file otherfile.txt' ex cmd goes through so that ':file' gives 
> 'otherfile.txt' in the end.
> 2) Immediate abort after E23.
> 3) Or at least some notification that the file was not changed to 'b.txt'.
> 
> This is VIM 8.0.1648 on a Linux machine. VIM 7.4 is affected too.

I can reproduce it.  So the suspicion is that the error for the missing
register causes the command to fail later.

-- 
hundred-and-one symptoms of being an internet addict:
86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui