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