diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-11-30 13:03:28 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-11-30 13:03:28 +0100 |
commit | 6d8f9c6f59f49c3810e5336e1a558f3d61acd30e (patch) | |
tree | f8a364b8b69c1198cfe48a55bb5c90be5e0d5335 /src | |
parent | 49e4ec6eee224be8426cb9d10b9d6302f948a23e (diff) | |
download | vim-git-6d8f9c6f59f49c3810e5336e1a558f3d61acd30e.tar.gz |
updated for version 7.3.356v7.3.356
Problem: Using "o" with 'cindent' set may freeze Vim. (lolilolicon)
Solution: Skip over {} correctly. (Hari G)
Diffstat (limited to 'src')
-rw-r--r-- | src/misc1.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c index 95b45479c..d260b0c2a 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -6127,7 +6127,7 @@ corr_ind_maxparen(ind_maxparen, startpos) /* * Set w_cursor.col to the column number of the last unmatched ')' or '{' in - * line "l". + * line "l". "l" must point to the start of the line. */ static int find_last_paren(l, start, end) @@ -6140,7 +6140,7 @@ find_last_paren(l, start, end) curwin->w_cursor.col = 0; /* default is start of line */ - for (i = 0; l[i]; i++) + for (i = 0; l[i] != NUL; i++) { i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */ i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */ @@ -7953,6 +7953,7 @@ term_again: * If we're at the end of a block, skip to the start of * that block. */ + l = ml_get_curline(); if (find_last_paren(l, '{', '}') && (trypos = find_start_brace(ind_maxcomment)) != NULL) /* XXX */ diff --git a/src/version.c b/src/version.c index 8496ef41a..7a13d1315 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 356, +/**/ 355, /**/ 354, |