4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when spell correcting triggers an autocommand that reloads
13 Solution: Make a copy of the line to be modified. (Dominique Pelle)
17 *** ../vim-7.2.331/src/spell.c 2009-07-22 11:03:38.000000000 +0200
18 --- src/spell.c 2010-01-19 12:44:42.000000000 +0100
21 /* Figure out if the word should be capitalised. */
22 need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col);
24 ! line = ml_get_curline();
26 /* Get the list of suggestions. Limit to 'lines' - 2 or the number in
27 * 'spellsuggest', whatever is smaller. */
29 /* Figure out if the word should be capitalised. */
30 need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col);
32 ! /* Make a copy of current line since autocommands may free the line. */
33 ! line = vim_strsave(ml_get_curline());
37 /* Get the list of suggestions. Limit to 'lines' - 2 or the number in
38 * 'spellsuggest', whatever is smaller. */
42 curwin->w_cursor = prev_cursor;
44 spell_find_cleanup(&sug);
52 rescore_suggestions(su);
55 ! * While going throught the soundfold tree "su_maxscore" is the score
56 * for the soundfold word, limits the changes that are being tried,
57 * and "su_sfmaxscore" the rescored score, which is set by
58 * cleanup_suggestions().
60 rescore_suggestions(su);
63 ! * While going through the soundfold tree "su_maxscore" is the score
64 * for the soundfold word, limits the changes that are being tried,
65 * and "su_sfmaxscore" the rescored score, which is set by
66 * cleanup_suggestions().
69 char_u tword[MAXWLEN]; /* good word collected so far */
70 trystate_T stack[MAXWLEN];
71 char_u preword[MAXWLEN * 3]; /* word found with proper case;
72 ! * concatanation of prefix compound
73 * words and split word. NUL terminated
74 * when going deeper but not when coming
77 char_u tword[MAXWLEN]; /* good word collected so far */
78 trystate_T stack[MAXWLEN];
79 char_u preword[MAXWLEN * 3]; /* word found with proper case;
80 ! * concatenation of prefix compound
81 * words and split word. NUL terminated
82 * when going deeper but not when coming
84 *** ../vim-7.2.331/src/version.c 2010-01-19 12:46:51.000000000 +0100
85 --- src/version.c 2010-01-19 13:05:32.000000000 +0100
89 { /* Add new patch number below this line */
95 hundred-and-one symptoms of being an internet addict:
96 117. You are more comfortable typing in html.
98 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
99 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
100 \\\ download, build and distribute -- http://www.A-A-P.org ///
101 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///