4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When 'ignorecase' is set and using Insert mode completion,
12 typing characters to change the list of matches, case is not
13 ignored. (Hugo Ahlenius)
14 Solution: Store the 'ignorecase' flag with the matches where needed.
15 Files: src/edit.c, src/search.c, src/spell.c
18 *** ../vim-7.0.067/src/edit.c Tue Aug 29 16:10:54 2006
19 --- src/edit.c Tue Aug 29 14:57:46 2006
22 /* compl_pattern doesn't need to be set */
23 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
24 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
25 ! -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
28 /* Handle like dictionary completion. */
30 /* compl_pattern doesn't need to be set */
31 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
32 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
33 ! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
36 /* Handle like dictionary completion. */
39 ptr = find_word_end(ptr);
40 add_r = ins_compl_add_infercase(regmatch->startp[0],
41 (int)(ptr - regmatch->startp[0]),
42 ! FALSE, files[i], *dir, 0);
47 ptr = find_word_end(ptr);
48 add_r = ins_compl_add_infercase(regmatch->startp[0],
49 (int)(ptr - regmatch->startp[0]),
50 ! p_ic, files[i], *dir, 0);
56 ptr = find_word_end(ptr);
57 add_r = ins_compl_add_infercase(wstart,
59 ! FALSE, files[i], *dir, 0);
64 ptr = find_word_end(ptr);
65 add_r = ins_compl_add_infercase(wstart,
67 ! p_ic, files[i], *dir, 0);
73 TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
74 TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
76 ! ins_compl_add_matches(num_matches, matches, FALSE);
81 TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
82 TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
84 ! ins_compl_add_matches(num_matches, matches, p_ic);
90 num_matches = expand_spelling(first_match_pos.lnum,
91 first_match_pos.col, compl_pattern, &matches);
93 ! ins_compl_add_matches(num_matches, matches, FALSE);
98 num_matches = expand_spelling(first_match_pos.lnum,
99 first_match_pos.col, compl_pattern, &matches);
101 ! ins_compl_add_matches(num_matches, matches, p_ic);
110 ! if (ins_compl_add_infercase(ptr, len, FALSE,
111 ins_buf == curbuf ? NULL : ins_buf->b_sfname,
112 0, flags) != NOTDONE)
118 ! if (ins_compl_add_infercase(ptr, len, p_ic,
119 ins_buf == curbuf ? NULL : ins_buf->b_sfname,
120 0, flags) != NOTDONE)
124 vim_free(compl_orig_text);
125 compl_orig_text = vim_strnsave(line + compl_col, compl_length);
126 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
127 ! -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
129 vim_free(compl_pattern);
130 compl_pattern = NULL;
132 vim_free(compl_orig_text);
133 compl_orig_text = vim_strnsave(line + compl_col, compl_length);
134 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
135 ! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
137 vim_free(compl_pattern);
138 compl_pattern = NULL;
139 *** ../vim-7.0.067/src/search.c Fri May 5 23:15:17 2006
140 --- src/search.c Tue Aug 29 14:56:15 2006
146 ! add_r = ins_compl_add_infercase(aux, i, FALSE,
147 curr_fname == curbuf->b_fname ? NULL : curr_fname,
154 ! add_r = ins_compl_add_infercase(aux, i, p_ic,
155 curr_fname == curbuf->b_fname ? NULL : curr_fname,
158 *** ../vim-7.0.067/src/spell.c Sun Jul 23 21:52:16 2006
159 --- src/spell.c Tue Aug 29 14:56:26 2006
162 ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
163 : STRNCMP(p, pat, STRLEN(pat)) == 0)
164 && ins_compl_add_infercase(p, (int)STRLEN(p),
165 ! FALSE, NULL, *dir, 0) == OK)
166 /* if dir was BACKWARD then honor it just once */
170 ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
171 : STRNCMP(p, pat, STRLEN(pat)) == 0)
172 && ins_compl_add_infercase(p, (int)STRLEN(p),
173 ! p_ic, NULL, *dir, 0) == OK)
174 /* if dir was BACKWARD then honor it just once */
177 *** ../vim-7.0.067/src/version.c Tue Aug 29 16:10:54 2006
178 --- src/version.c Tue Aug 29 16:13:49 2006
182 { /* Add new patch number below this line */
188 hundred-and-one symptoms of being an internet addict:
189 266. You hear most of your jokes via e-mail instead of in person.
191 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
192 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
193 \\\ download, build and distribute -- http://www.A-A-P.org ///
194 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///