1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Using "o" with 'cindent' set may freeze Vim. (lolilolicon)
12 Solution: Skip over {} correctly. (Hari G)
16 *** ../vim-7.3.355/src/misc1.c 2011-10-04 18:03:43.000000000 +0200
17 --- src/misc1.c 2011-11-30 12:56:55.000000000 +0100
22 * Set w_cursor.col to the column number of the last unmatched ')' or '{' in
26 find_last_paren(l, start, end)
30 * Set w_cursor.col to the column number of the last unmatched ')' or '{' in
31 ! * line "l". "l" must point to the start of the line.
34 find_last_paren(l, start, end)
38 curwin->w_cursor.col = 0; /* default is start of line */
40 ! for (i = 0; l[i]; i++)
42 i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */
43 i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
46 curwin->w_cursor.col = 0; /* default is start of line */
48 ! for (i = 0; l[i] != NUL; i++)
50 i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */
51 i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
55 * If we're at the end of a block, skip to the start of
58 + l = ml_get_curline();
59 if (find_last_paren(l, '{', '}')
60 && (trypos = find_start_brace(ind_maxcomment))
62 *** ../vim-7.3.355/src/version.c 2011-11-30 11:31:25.000000000 +0100
63 --- src/version.c 2011-11-30 13:02:52.000000000 +0100
67 { /* Add new patch number below this line */
73 hundred-and-one symptoms of being an internet addict:
74 213. Your kids start referring to you as "that guy in front of the monitor."
76 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
77 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
78 \\\ an exciting new programming language -- http://www.Zimbu.org ///
79 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///