|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.395
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.395 (after 7.4.355)
|
|
|
22c937 |
Problem: C indent is wrong below an if with wrapped condition followed by
|
|
|
22c937 |
curly braces. (Trevor Powell)
|
|
|
22c937 |
Solution: Make a copy of tryposBrace.
|
|
|
22c937 |
Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.394/src/misc1.c 2014-08-06 12:49:06.711289205 +0200
|
|
|
22c937 |
--- src/misc1.c 2014-08-06 17:35:45.003165594 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 6995,7000 ****
|
|
|
22c937 |
--- 6995,7001 ----
|
|
|
22c937 |
char_u *linecopy;
|
|
|
22c937 |
pos_T *trypos;
|
|
|
22c937 |
pos_T *tryposBrace = NULL;
|
|
|
22c937 |
+ pos_T tryposBraceCopy;
|
|
|
22c937 |
pos_T our_paren_pos;
|
|
|
22c937 |
char_u *start;
|
|
|
22c937 |
int start_brace;
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 7532,7538 ****
|
|
|
22c937 |
--- 7533,7543 ----
|
|
|
22c937 |
/*
|
|
|
22c937 |
* We are inside braces, there is a { before this line at the position
|
|
|
22c937 |
* stored in tryposBrace.
|
|
|
22c937 |
+ * Make a copy of tryposBrace, it may point to pos_copy inside
|
|
|
22c937 |
+ * find_start_brace(), which may be changed somewhere.
|
|
|
22c937 |
*/
|
|
|
22c937 |
+ tryposBraceCopy = *tryposBrace;
|
|
|
22c937 |
+ tryposBrace = &tryposBraceCopy;
|
|
|
22c937 |
trypos = tryposBrace;
|
|
|
22c937 |
ourscope = trypos->lnum;
|
|
|
22c937 |
start = ml_get(ourscope);
|
|
|
22c937 |
*** ../vim-7.4.394/src/testdir/test3.in 2014-07-03 22:57:51.299862927 +0200
|
|
|
22c937 |
--- src/testdir/test3.in 2014-08-06 17:19:41.099172522 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 464,469 ****
|
|
|
22c937 |
--- 464,477 ----
|
|
|
22c937 |
asdfasdf
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ for ( int i = 0;
|
|
|
22c937 |
+ i < 10; i++ )
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ }
|
|
|
22c937 |
+ i = 0;
|
|
|
22c937 |
+ }
|
|
|
22c937 |
+
|
|
|
22c937 |
class bob
|
|
|
22c937 |
{
|
|
|
22c937 |
int foo() {return 1;}
|
|
|
22c937 |
*** ../vim-7.4.394/src/testdir/test3.ok 2014-07-03 22:57:51.299862927 +0200
|
|
|
22c937 |
--- src/testdir/test3.ok 2014-08-06 17:20:11.867172301 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 452,457 ****
|
|
|
22c937 |
--- 452,465 ----
|
|
|
22c937 |
asdfasdf
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ for ( int i = 0;
|
|
|
22c937 |
+ i < 10; i++ )
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ }
|
|
|
22c937 |
+ i = 0;
|
|
|
22c937 |
+ }
|
|
|
22c937 |
+
|
|
|
22c937 |
class bob
|
|
|
22c937 |
{
|
|
|
22c937 |
int foo() {return 1;}
|
|
|
22c937 |
*** ../vim-7.4.394/src/version.c 2014-08-06 16:49:51.203185387 +0200
|
|
|
22c937 |
--- src/version.c 2014-08-06 17:43:44.243162150 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 743,744 ****
|
|
|
22c937 |
--- 743,746 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 395,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
An operatingsystem is just a name you give to the rest of bloating
|
|
|
22c937 |
idiosyncratic machine-based-features you left out of your editor.
|
|
|
22c937 |
(author unknown)
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|