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

Re: Patch 7.2.010

Expand Messages
  • James Vega
    ... This ended up breaking the functionality of K all together. The entire line, starting from the beginning of the word under the cursor, is used in the
    Message 1 of 3 , Oct 3, 2008
    • 0 Attachment
      On Sat, Sep 06, 2008 at 04:56:25PM +0200, Bram Moolenaar wrote:
      > Patch 7.2.010
      > Problem: When using "K" in Visual mode not all characters are properly
      > escaped. (Ben Schmidt)
      > Solution: Use a function with the functionality of shellescape(). (Jan
      > Minar)
      > Files: src/mbyte.c, src/misc2.c, src/normal.c

      This ended up breaking the functionality of K all together. The entire
      line, starting from the beginning of the word under the cursor, is used
      in the command instead of just the word itself. This can be verified by
      placing the cursor on the word popen in the following line and pressing
      K.

      FILE *popen(const char *command, const char *type);

      The attached patch fixes the problem.

      --
      James
      GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@...>
    • Bram Moolenaar
      ... Thanks. This is not valid C (can t allocate an array with variable size), but it does point out the location where the fix should go. -- hundred-and-one
      Message 2 of 3 , Oct 30, 2008
      • 0 Attachment
        James Vega wrote:

        > On Sat, Sep 06, 2008 at 04:56:25PM +0200, Bram Moolenaar wrote:
        > > Patch 7.2.010
        > > Problem: When using "K" in Visual mode not all characters are properly
        > > escaped. (Ben Schmidt)
        > > Solution: Use a function with the functionality of shellescape(). (Jan
        > > Minar)
        > > Files: src/mbyte.c, src/misc2.c, src/normal.c
        >
        > This ended up breaking the functionality of K all together. The entire
        > line, starting from the beginning of the word under the cursor, is used
        > in the command instead of just the word itself. This can be verified by
        > placing the cursor on the word popen in the following line and pressing
        > K.
        >
        > FILE *popen(const char *command, const char *type);
        >
        > The attached patch fixes the problem.

        Thanks. This is not valid C (can't allocate an array with variable
        size), but it does point out the location where the fix should go.

        --
        hundred-and-one symptoms of being an internet addict:
        152. You find yourself falling for someone you've never seen or hardly
        know, but, boy can he/she TYPE!!!!!!

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.