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

Re: Patch 7.3.1297

Expand Messages
  • Ben Fritz
    ... When looking into the bug report I found that finddir() is also affected. I *think* from a quick glance at the code that the fix is in a shared function,
    Message 1 of 6 , Jul 3 12:36 PM
      On Wednesday, July 3, 2013 10:14:24 AM UTC-5, Bram Moolenaar 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)
      >

      When looking into the bug report I found that finddir() is also affected.

      I *think* from a quick glance at the code that the fix is in a shared function, is this correct?

      Do you also want to add a test for finddir()?

      --
      --
      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.
    • Bram Moolenaar
      ... Most likely, yes. ... It s always good to have more tests. I also noticed there is no test for glob(). -- TIM: But follow only if you are men of valour.
      Message 2 of 6 , Jul 3 1:38 PM
        Ben Fritz write:

        > On Wednesday, July 3, 2013 10:14:24 AM UTC-5, Bram Moolenaar 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)
        > >
        >
        > When looking into the bug report I found that finddir() is also affected.
        >
        > I *think* from a quick glance at the code that the fix is in a shared
        > function, is this correct?

        Most likely, yes.

        > Do you also want to add a test for finddir()?

        It's always good to have more tests. I also noticed there is no test
        for glob().

        --
        TIM: But follow only if you are men of valour. For the entrance to this cave
        is guarded by a monster, a creature so foul and cruel that no man yet has
        fought with it and lived. Bones of full fifty men lie strewn about its
        lair ...
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- 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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Yukihiro Nakadaira
        ... 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 $
        Message 3 of 6 , Jul 4 8:20 PM
          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:


          --
          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.
           
           
        • 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 4 of 6 , Jul 5 4:55 AM
            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 5 of 6 , Jul 5 5:39 AM
              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.