Loading ...
Sorry, an error occurred while loading the content.
 

Re: Patch 7.3.1297

Expand Messages
  • Christian Brabandt
    Hi Yukihiro! ... Was this actually ever supposed to work? I thought, the second parameter for findfile() needs to be a directory for upwards-search: ,----[ :h
    Message 1 of 6 , Jul 5, 2013
      Hi Yukihiro!

      On Fr, 05 Jul 2013, Yukihiro Nakadaira wrote:

      > On Thu, Jul 4, 2013 at 12:14 AM, Bram Moolenaar <Bram@...> wrote:
      >
      > >
      > > Patch 7.3.1297
      > > Problem: findfile() directory matching does not work when a star follows
      > > text. (Markus Braun)
      > > Solution: Make a wildcard work properly. (Christian Brabandt)
      > > Files: src/misc2.c, src/testdir/test89.in, src/testdir/test89.ok
      > >
      >
      > With this patch, upward search fails when search is started from
      > non-existing directory.
      >
      > Steps To Reproduce:
      > $ mkdir -p foo/bar/baz
      > $ touch foo/hoge.txt
      > $ cd foo
      > $ vim -u NONE -N
      > :echo "test1: " . findfile("hoge.txt", getcwd() . "/bar/baz;")
      > :echo "test2: " . findfile("hoge.txt", getcwd() . "/not/exists;")
      > :echo "test3: " . findfile("hoge.txt", "foo;")
      >
      > Result with 7.3.1296:
      > test1: hoge.txt
      > test2: hoge.txt
      > test3: hoge.txt
      >
      > Result with 7.3.1297:
      > test1: hoge.txt
      > test2:
      > test3:

      Was this actually ever supposed to work? I thought, the second parameter
      for findfile() needs to be a directory for upwards-search:


      ,----[ :h file-searching ]-
      | 2) Upward search:
      | Here you can give a directory and then search the directory tree upward for
      | a file. You could give stop-directories to limit the upward search. The
      | stop-directories are appended to the path (for the 'path' option) or to
      | the filename (for the 'tags' option) with a ';'. If you want several
      | stop-directories separate them with ';'. If you want no stop-directory
      | ("search upward till the root directory) just use ';'. >
      `----

      regards,
      Christian
      --
      Man sollte mit einer Frau so lange sprechen, bis sie mit sich reden lنكt.

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Yukihiro Nakadaira
      ... I don t know what is the correct behavior. I just realized this change. I have no problem if this change is intended. -- Yukihiro Nakadaira -
      Message 2 of 6 , Jul 5, 2013
        On Fri, Jul 5, 2013 at 8:55 PM, Christian Brabandt <cblists@...> wrote:
        Hi Yukihiro!

        On Fr, 05 Jul 2013, Yukihiro Nakadaira wrote:

        > On Thu, Jul 4, 2013 at 12:14 AM, Bram Moolenaar <Bram@...> wrote:
        >
        > >
        > > Patch 7.3.1297
        > > Problem:    findfile() directory matching does not work when a star follows
        > >             text. (Markus Braun)
        > > Solution:   Make a wildcard work properly. (Christian Brabandt)
        > > Files:      src/misc2.c, src/testdir/test89.in, src/testdir/test89.ok
        > >
        >
        > With this patch, upward search fails when search is started from
        > non-existing directory.
        >
        > Steps To Reproduce:
        >   $ mkdir -p foo/bar/baz
        >   $ touch foo/hoge.txt
        >   $ cd foo
        >   $ vim -u NONE -N
        >   :echo "test1: " . findfile("hoge.txt", getcwd() . "/bar/baz;")
        >   :echo "test2: " . findfile("hoge.txt", getcwd() . "/not/exists;")
        >   :echo "test3: " . findfile("hoge.txt", "foo;")
        >
        > Result with 7.3.1296:
        >   test1: hoge.txt
        >   test2: hoge.txt
        >   test3: hoge.txt
        >
        > Result with 7.3.1297:
        >   test1: hoge.txt
        >   test2:
        >   test3:

        Was this actually ever supposed to work? I thought, the second parameter
        for findfile() needs to be a directory for upwards-search:


        ,----[ :h file-searching ]-
        | 2) Upward search:
        |    Here you can give a directory and then search the directory tree upward for
        |    a file.  You could give stop-directories to limit the upward search.  The
        |    stop-directories are appended to the path (for the 'path' option) or to
        |    the filename (for the 'tags' option) with a ';'.  If you want several
        |    stop-directories separate them with ';'.  If you want no stop-directory
        |    ("search upward till the root directory) just use ';'. >
        `----

        I don't know what is the correct behavior.  I just realized this change.
        I have no problem if this change is intended.

        --
        Yukihiro Nakadaira - yukihiro.nakadaira@...

        --
        --
        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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
         
         
      Your message has been successfully submitted and would be delivered to recipients shortly.