]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.332
- new
[packages/vim.git] / 7.2.332
CommitLineData
907f7fb0
ER
1To: vim-dev@vim.org
2Subject: Patch 7.2.332
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.332
11Problem: Crash when spell correcting triggers an autocommand that reloads
12 the buffer.
13Solution: Make a copy of the line to be modified. (Dominique Pelle)
14Files: src/spell.c
15
16
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
19***************
20*** 10306,10312 ****
21 /* Figure out if the word should be capitalised. */
22 need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col);
23
24! line = ml_get_curline();
25
26 /* Get the list of suggestions. Limit to 'lines' - 2 or the number in
27 * 'spellsuggest', whatever is smaller. */
28--- 10306,10315 ----
29 /* Figure out if the word should be capitalised. */
30 need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col);
31
32! /* Make a copy of current line since autocommands may free the line. */
33! line = vim_strsave(ml_get_curline());
34! if (line == NULL)
35! goto skip;
36
37 /* Get the list of suggestions. Limit to 'lines' - 2 or the number in
38 * 'spellsuggest', whatever is smaller. */
39***************
40*** 10470,10475 ****
41--- 10473,10480 ----
42 curwin->w_cursor = prev_cursor;
43
44 spell_find_cleanup(&sug);
45+ skip:
46+ vim_free(line);
47 }
48
49 /*
50***************
51*** 10931,10937 ****
52 rescore_suggestions(su);
53
54 /*
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().
59--- 10936,10942 ----
60 rescore_suggestions(su);
61
62 /*
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().
67***************
68*** 11415,11421 ****
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
75 * back. */
76--- 11420,11426 ----
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
83 * back. */
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
86***************
87*** 683,684 ****
88--- 683,686 ----
89 { /* Add new patch number below this line */
90+ /**/
91+ 332,
92 /**/
93
94--
95hundred-and-one symptoms of being an internet addict:
96117. You are more comfortable typing in html.
97
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 ///
This page took 0.042922 seconds and 4 git commands to generate.