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

Patch 7.2.378

Expand Messages
  • Bram Moolenaar
    Patch 7.2.378 Problem: C function declaration indented too much. (Rui) Solution: Don t see a line containing { or } as a type. (Matt Wozniski) Files:
    Message 1 of 1 , Mar 2, 2010
    • 0 Attachment
      Patch 7.2.378
      Problem: C function declaration indented too much. (Rui)
      Solution: Don't see a line containing { or } as a type. (Matt Wozniski)
      Files: src/misc1.c


      *** ../vim-7.2.377/src/misc1.c 2010-01-06 17:46:03.000000000 +0100
      --- src/misc1.c 2010-02-26 22:36:50.000000000 +0100
      ***************
      *** 7727,7737 ****
      /*
      * If the NEXT line is a function declaration, the current
      * line needs to be indented as a function type spec.
      ! * Don't do this if the current line looks like a comment
      ! * or if the current line is terminated, ie. ends in ';'.
      */
      else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
      && !cin_nocode(theline)
      && !cin_ends_in(theline, (char_u *)":", NULL)
      && !cin_ends_in(theline, (char_u *)",", NULL)
      && cin_isfuncdecl(NULL, cur_curpos.lnum + 1)
      --- 7727,7740 ----
      /*
      * If the NEXT line is a function declaration, the current
      * line needs to be indented as a function type spec.
      ! * Don't do this if the current line looks like a comment or if the
      ! * current line is terminated, ie. ends in ';', or if the current line
      ! * contains { or }: "void f() {\n if (1)"
      */
      else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
      && !cin_nocode(theline)
      + && vim_strchr(theline, '{') == NULL
      + && vim_strchr(theline, '}') == NULL
      && !cin_ends_in(theline, (char_u *)":", NULL)
      && !cin_ends_in(theline, (char_u *)",", NULL)
      && cin_isfuncdecl(NULL, cur_curpos.lnum + 1)
      *** ../vim-7.2.377/src/version.c 2010-02-26 22:05:17.000000000 +0100
      --- src/version.c 2010-03-02 12:30:30.000000000 +0100
      ***************
      *** 683,684 ****
      --- 683,686 ----
      { /* Add new patch number below this line */
      + /**/
      + 378,
      /**/

      --
      An extraordinary TALL KNIGHT in all black (possibly John with Mike on his
      shoulders) walks out from the dark trees. He is extremely fierce and
      gruesome countenance. He walks towards KING ARTHUR and PATSY, who are
      wazzing like mad. (Salopian slang, meaning very scared. almost to the
      point of wetting oneself, e.g. before an important football match or
      prior to a postering. Salopian slang meaning a beating by the school
      praeposters. Sorry about the Salopian slant to this stage direction - Ed.)
      "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/ \\\
      \\\ 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.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.