On Sep 11, 2013 8:13 PM, "Wiktor Ruben" <smieciar...@gmail.com> wrote: > > Hello, > > I use Vim 7.4.5. Let me start with some prerequisities: > > ~ $ mkdir foobar > ~ $ cd foobar > ~/foobar $ touch foo bar baz > ~/foobar $ vim -u NONE foo bar baz > > Now, make the observation that: > > :ls > 1 %a "foo" line 1 > 2 "bar" line 0 > 3 "baz" line 0 > > That being so when I do: > > :buffer foo<CTRL-D> > > I expect to see only 'foo' buffer. Instead I've got this: > > foo ~/foobar/bar ~/foobar/baz > > I presume this happens because there is 'foo' substring in the absolute > path for buffers 'bar' and 'baz'. This behaviour is totally wrong > because for the sake of consistency ':buffer' should match against > buffer name as displayed by ':ls', not file name absolute path. > > But let us assume for a moment that this behaviour is correct. Then: > > :buffer bar<CTRL-D> > > should display analogous results (because 'bar' is a substring in the > absolute path for all files). That is:
Not only a substring, but it also starts one component of a path. This should be the reason. > ~/foobar/foo bar ~/foobar/baz > > Instead we are given only: > > bar > > Could someone please explain me this behaviour? > > -- > -- > 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 vim_dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.