| To: vim-dev@vim.org |
| Subject: Patch 7.0.068 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.0.068 |
| Problem: When 'ignorecase' is set and using Insert mode completion, |
| typing characters to change the list of matches, case is not |
| ignored. (Hugo Ahlenius) |
| Solution: Store the 'ignorecase' flag with the matches where needed. |
| Files: src/edit.c, src/search.c, src/spell.c |
| |
| |
| |
| |
| |
| *** 2405,2411 **** |
| /* compl_pattern doesn't need to be set */ |
| compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length); |
| if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, |
| ! -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) |
| return; |
| |
| /* Handle like dictionary completion. */ |
| --- 2405,2411 ---- |
| /* compl_pattern doesn't need to be set */ |
| compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length); |
| if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, |
| ! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) |
| return; |
| |
| /* Handle like dictionary completion. */ |
| |
| *** 2821,2827 **** |
| ptr = find_word_end(ptr); |
| add_r = ins_compl_add_infercase(regmatch->startp[0], |
| (int)(ptr - regmatch->startp[0]), |
| ! FALSE, files[i], *dir, 0); |
| if (thesaurus) |
| { |
| char_u *wstart; |
| --- 2821,2827 ---- |
| ptr = find_word_end(ptr); |
| add_r = ins_compl_add_infercase(regmatch->startp[0], |
| (int)(ptr - regmatch->startp[0]), |
| ! p_ic, files[i], *dir, 0); |
| if (thesaurus) |
| { |
| char_u *wstart; |
| |
| *** 2857,2863 **** |
| ptr = find_word_end(ptr); |
| add_r = ins_compl_add_infercase(wstart, |
| (int)(ptr - wstart), |
| ! FALSE, files[i], *dir, 0); |
| } |
| } |
| if (add_r == OK) |
| --- 2857,2863 ---- |
| ptr = find_word_end(ptr); |
| add_r = ins_compl_add_infercase(wstart, |
| (int)(ptr - wstart), |
| ! p_ic, files[i], *dir, 0); |
| } |
| } |
| if (add_r == OK) |
| |
| *** 3826,3832 **** |
| TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0), |
| TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) |
| { |
| ! ins_compl_add_matches(num_matches, matches, FALSE); |
| } |
| p_ic = save_p_ic; |
| break; |
| --- 3826,3832 ---- |
| TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0), |
| TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) |
| { |
| ! ins_compl_add_matches(num_matches, matches, p_ic); |
| } |
| p_ic = save_p_ic; |
| break; |
| |
| *** 3867,3873 **** |
| num_matches = expand_spelling(first_match_pos.lnum, |
| first_match_pos.col, compl_pattern, &matches); |
| if (num_matches > 0) |
| ! ins_compl_add_matches(num_matches, matches, FALSE); |
| #endif |
| break; |
| |
| --- 3867,3873 ---- |
| num_matches = expand_spelling(first_match_pos.lnum, |
| first_match_pos.col, compl_pattern, &matches); |
| if (num_matches > 0) |
| ! ins_compl_add_matches(num_matches, matches, p_ic); |
| #endif |
| break; |
| |
| |
| *** 4001,4007 **** |
| continue; |
| } |
| } |
| ! if (ins_compl_add_infercase(ptr, len, FALSE, |
| ins_buf == curbuf ? NULL : ins_buf->b_sfname, |
| 0, flags) != NOTDONE) |
| { |
| --- 4001,4007 ---- |
| continue; |
| } |
| } |
| ! if (ins_compl_add_infercase(ptr, len, p_ic, |
| ins_buf == curbuf ? NULL : ins_buf->b_sfname, |
| 0, flags) != NOTDONE) |
| { |
| |
| *** 4809,4815 **** |
| vim_free(compl_orig_text); |
| compl_orig_text = vim_strnsave(line + compl_col, compl_length); |
| if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, |
| ! -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) |
| { |
| vim_free(compl_pattern); |
| compl_pattern = NULL; |
| --- 4809,4815 ---- |
| vim_free(compl_orig_text); |
| compl_orig_text = vim_strnsave(line + compl_col, compl_length); |
| if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, |
| ! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) |
| { |
| vim_free(compl_pattern); |
| compl_pattern = NULL; |
| |
| |
| |
| *** 4871,4877 **** |
| goto exit_matched; |
| } |
| |
| ! add_r = ins_compl_add_infercase(aux, i, FALSE, |
| curr_fname == curbuf->b_fname ? NULL : curr_fname, |
| dir, reuse); |
| if (add_r == OK) |
| --- 4876,4882 ---- |
| goto exit_matched; |
| } |
| |
| ! add_r = ins_compl_add_infercase(aux, i, p_ic, |
| curr_fname == curbuf->b_fname ? NULL : curr_fname, |
| dir, reuse); |
| if (add_r == OK) |
| |
| |
| |
| *** 15658,15664 **** |
| ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0 |
| : STRNCMP(p, pat, STRLEN(pat)) == 0) |
| && ins_compl_add_infercase(p, (int)STRLEN(p), |
| ! FALSE, NULL, *dir, 0) == OK) |
| /* if dir was BACKWARD then honor it just once */ |
| *dir = FORWARD; |
| } |
| --- 15662,15668 ---- |
| ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0 |
| : STRNCMP(p, pat, STRLEN(pat)) == 0) |
| && ins_compl_add_infercase(p, (int)STRLEN(p), |
| ! p_ic, NULL, *dir, 0) == OK) |
| /* if dir was BACKWARD then honor it just once */ |
| *dir = FORWARD; |
| } |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 68, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 266. You hear most of your jokes via e-mail instead of in person. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |