Mercurial > vim
comparison src/misc1.c @ 6114:65b0974c5beb v7.4.395
updated for version 7.4.395
Problem: C indent is wrong below an if with wrapped condition followed by
curly braces. (Trevor Powell)
Solution: Make a copy of tryposBrace.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 06 Aug 2014 17:44:14 +0200 |
parents | d3a674f6c737 |
children | 96a4fa8e530c |
comparison
equal
deleted
inserted
replaced
6113:5464a97d23fd | 6114:65b0974c5beb |
---|---|
6993 colnr_T col; | 6993 colnr_T col; |
6994 char_u *theline; | 6994 char_u *theline; |
6995 char_u *linecopy; | 6995 char_u *linecopy; |
6996 pos_T *trypos; | 6996 pos_T *trypos; |
6997 pos_T *tryposBrace = NULL; | 6997 pos_T *tryposBrace = NULL; |
6998 pos_T tryposBraceCopy; | |
6998 pos_T our_paren_pos; | 6999 pos_T our_paren_pos; |
6999 char_u *start; | 7000 char_u *start; |
7000 int start_brace; | 7001 int start_brace; |
7001 #define BRACE_IN_COL0 1 /* '{' is in column 0 */ | 7002 #define BRACE_IN_COL0 1 /* '{' is in column 0 */ |
7002 #define BRACE_AT_START 2 /* '{' is at start of line */ | 7003 #define BRACE_AT_START 2 /* '{' is at start of line */ |
7530 else | 7531 else |
7531 { | 7532 { |
7532 /* | 7533 /* |
7533 * We are inside braces, there is a { before this line at the position | 7534 * We are inside braces, there is a { before this line at the position |
7534 * stored in tryposBrace. | 7535 * stored in tryposBrace. |
7536 * Make a copy of tryposBrace, it may point to pos_copy inside | |
7537 * find_start_brace(), which may be changed somewhere. | |
7535 */ | 7538 */ |
7539 tryposBraceCopy = *tryposBrace; | |
7540 tryposBrace = &tryposBraceCopy; | |
7536 trypos = tryposBrace; | 7541 trypos = tryposBrace; |
7537 ourscope = trypos->lnum; | 7542 ourscope = trypos->lnum; |
7538 start = ml_get(ourscope); | 7543 start = ml_get(ourscope); |
7539 | 7544 |
7540 /* | 7545 /* |