0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

updated for version 7.1-050

This commit is contained in:
Bram Moolenaar
2007-08-04 10:14:52 +00:00
parent 179af2c90b
commit e7c5686944
2 changed files with 15 additions and 8 deletions

View File

@@ -4820,7 +4820,7 @@ static int cin_isdo __ARGS((char_u *));
static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int)); static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
static int cin_iswhileofdo_end __ARGS((int terminated, int ind_maxparen, int ind_maxcomment)); static int cin_iswhileofdo_end __ARGS((int terminated, int ind_maxparen, int ind_maxcomment));
static int cin_isbreak __ARGS((char_u *)); static int cin_isbreak __ARGS((char_u *));
static int cin_is_cpp_baseclass __ARGS((char_u *line, colnr_T *col)); static int cin_is_cpp_baseclass __ARGS((colnr_T *col));
static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass)); static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass));
static int cin_ends_in __ARGS((char_u *, char_u *, char_u *)); static int cin_ends_in __ARGS((char_u *, char_u *, char_u *));
static int cin_skip2pos __ARGS((pos_T *trypos)); static int cin_skip2pos __ARGS((pos_T *trypos));
@@ -5585,13 +5585,13 @@ cin_isbreak(p)
* This is a lot of guessing. Watch out for "cond ? func() : foo". * This is a lot of guessing. Watch out for "cond ? func() : foo".
*/ */
static int static int
cin_is_cpp_baseclass(line, col) cin_is_cpp_baseclass(col)
char_u *line;
colnr_T *col; /* return: column to align with */ colnr_T *col; /* return: column to align with */
{ {
char_u *s; char_u *s;
int class_or_struct, lookfor_ctor_init, cpp_base_class; int class_or_struct, lookfor_ctor_init, cpp_base_class;
linenr_T lnum = curwin->w_cursor.lnum; linenr_T lnum = curwin->w_cursor.lnum;
char_u *line = ml_get_curline();
*col = 0; *col = 0;
@@ -5619,7 +5619,8 @@ cin_is_cpp_baseclass(line, col)
*/ */
while (lnum > 1) while (lnum > 1)
{ {
s = skipwhite(ml_get(lnum - 1)); line = ml_get(lnum - 1);
s = skipwhite(line);
if (*s == '#' || *s == NUL) if (*s == '#' || *s == NUL)
break; break;
while (*s != NUL) while (*s != NUL)
@@ -5636,7 +5637,8 @@ cin_is_cpp_baseclass(line, col)
--lnum; --lnum;
} }
s = cin_skipcomment(ml_get(lnum)); line = ml_get(lnum);
s = cin_skipcomment(line);
for (;;) for (;;)
{ {
if (*s == NUL) if (*s == NUL)
@@ -5644,7 +5646,10 @@ cin_is_cpp_baseclass(line, col)
if (lnum == curwin->w_cursor.lnum) if (lnum == curwin->w_cursor.lnum)
break; break;
/* Continue in the cursor line. */ /* Continue in the cursor line. */
s = cin_skipcomment(ml_get(++lnum)); line = ml_get(++lnum);
s = cin_skipcomment(line);
if (*s == NUL)
continue;
} }
if (s[0] == ':') if (s[0] == ':')
@@ -7113,7 +7118,7 @@ get_c_indent()
n = FALSE; n = FALSE;
if (lookfor != LOOKFOR_TERM && ind_cpp_baseclass > 0) if (lookfor != LOOKFOR_TERM && ind_cpp_baseclass > 0)
{ {
n = cin_is_cpp_baseclass(l, &col); n = cin_is_cpp_baseclass(&col);
l = ml_get_curline(); l = ml_get_curline();
} }
if (n) if (n)
@@ -7704,7 +7709,7 @@ term_again:
n = FALSE; n = FALSE;
if (ind_cpp_baseclass != 0 && theline[0] != '{') if (ind_cpp_baseclass != 0 && theline[0] != '{')
{ {
n = cin_is_cpp_baseclass(l, &col); n = cin_is_cpp_baseclass(&col);
l = ml_get_curline(); l = ml_get_curline();
} }
if (n) if (n)

View File

@@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
50,
/**/ /**/
49, 49,
/**/ /**/