Re: Arg. list processing bug
- Neil Bird wrote:
> I've convinced myself that this is a bug. Try this (UNIX):Do ":args", it's there.
> # echo one > test1
> # echo two > test2
> # ln -s test2 test
> # ls
> test1 test2 test@
> # vim test*
> 3 files to edit
> 1 % "test" line 1
> 2 - "test1" line 0
> Press RETURN or enter command to continue
> So, erm, where's test2?
> At a guess, vim has somehow deduced that test and test2 are the 'same'The first one that's found. All the names in the argument list are added to
> file, but has oddly plumped for the symlink, not the real one. Or is it
> just going for the first one it came across?
the buffer list. But a file can only be in the buffer list once. The check
is done on device and inode number, thus symlinks are catched.
> (if you :n from "test", you get "test1", then "test" again [not test2],The ":next" command goes through the argument list. Since "test2" is really
> then the no-more error). A :bd on "test" first fixes it)
the same as "test", that's the buffer you will use.
> I'm not sure about this now. It's certainly not what I'd expect (esp.The shell expands "test*" to "test test1 test2", so that's the arguments you
> when I really wanted to edit test1 & test2, skipping test, but test* was
> easier to type!).
get inside Vim. It just does what you told it to do...
What could be changed is using the name of the actual file, not the first name
that was found. In this situation that would work. But when you do an ":e
test2" after ":e test", the name of the buffer would be changed. I'm not sure
if that doesn't have annoying side effects.
hundred-and-one symptoms of being an internet addict:
6. You refuse to go to a vacation spot with no electricity and no phone lines.
/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/