home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.395 < prev    next >
Encoding:
Internet Message Format  |  2014-08-05  |  2.5 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.395
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.395 (after 7.4.355)
  11. Problem:    C indent is wrong below an if with wrapped condition followed by
  12.         curly braces. (Trevor Powell)
  13. Solution:   Make a copy of tryposBrace.
  14. Files:        src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
  15.  
  16.  
  17. *** ../vim-7.4.394/src/misc1.c    2014-08-06 12:49:06.711289205 +0200
  18. --- src/misc1.c    2014-08-06 17:35:45.003165594 +0200
  19. ***************
  20. *** 6995,7000 ****
  21. --- 6995,7001 ----
  22.       char_u    *linecopy;
  23.       pos_T    *trypos;
  24.       pos_T    *tryposBrace = NULL;
  25. +     pos_T    tryposBraceCopy;
  26.       pos_T    our_paren_pos;
  27.       char_u    *start;
  28.       int        start_brace;
  29. ***************
  30. *** 7532,7538 ****
  31. --- 7533,7543 ----
  32.       /*
  33.        * We are inside braces, there is a { before this line at the position
  34.        * stored in tryposBrace.
  35. +      * Make a copy of tryposBrace, it may point to pos_copy inside
  36. +      * find_start_brace(), which may be changed somewhere.
  37.        */
  38. +     tryposBraceCopy = *tryposBrace;
  39. +     tryposBrace = &tryposBraceCopy;
  40.       trypos = tryposBrace;
  41.       ourscope = trypos->lnum;
  42.       start = ml_get(ourscope);
  43. *** ../vim-7.4.394/src/testdir/test3.in    2014-07-03 22:57:51.299862927 +0200
  44. --- src/testdir/test3.in    2014-08-06 17:19:41.099172522 +0200
  45. ***************
  46. *** 464,469 ****
  47. --- 464,477 ----
  48.       asdfasdf
  49.   }
  50.   
  51. + {
  52. + for ( int i = 0;
  53. +     i < 10; i++ )
  54. + {
  55. + }
  56. +     i = 0;
  57. + }
  58.   class bob
  59.   {
  60.       int foo() {return 1;}
  61. *** ../vim-7.4.394/src/testdir/test3.ok    2014-07-03 22:57:51.299862927 +0200
  62. --- src/testdir/test3.ok    2014-08-06 17:20:11.867172301 +0200
  63. ***************
  64. *** 452,457 ****
  65. --- 452,465 ----
  66.       asdfasdf
  67.   }
  68.   
  69. + {
  70. +     for ( int i = 0;
  71. +             i < 10; i++ )
  72. +     {
  73. +     }
  74. +     i = 0;
  75. + }
  76.   class bob
  77.   {
  78.       int foo() {return 1;}
  79. *** ../vim-7.4.394/src/version.c    2014-08-06 16:49:51.203185387 +0200
  80. --- src/version.c    2014-08-06 17:43:44.243162150 +0200
  81. ***************
  82. *** 743,744 ****
  83. --- 743,746 ----
  84.   {   /* Add new patch number below this line */
  85. + /**/
  86. +     395,
  87.   /**/
  88.  
  89. -- 
  90. An operatingsystem is just a name you give to the rest of bloating
  91. idiosyncratic machine-based-features you left out of your editor.
  92.             (author unknown)
  93.  
  94.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  95. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  96. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  97.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  98.