• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révision2e1e9b708941e1cfc2c0540196719f78e1ab18f5 (tree)
l'heure2006-06-23 00:13:21
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.0-023

Change Summary

Modification

diff -r 354ea37841d1 -r 2e1e9b708941 src/edit.c
--- a/src/edit.c Tue Jun 20 19:10:43 2006 +0000
+++ b/src/edit.c Thu Jun 22 15:13:21 2006 +0000
@@ -719,9 +719,14 @@
719719 #ifdef FEAT_INS_EXPAND
720720 /*
721721 * Special handling of keys while the popup menu is visible or wanted
722- * and the cursor is still in the completed word.
722+ * and the cursor is still in the completed word. Only when there is
723+ * a match, skip this when no matches were found.
723724 */
724- if (compl_started && pum_wanted() && curwin->w_cursor.col >= compl_col)
725+ if (compl_started
726+ && pum_wanted()
727+ && curwin->w_cursor.col >= compl_col
728+ && (compl_shown_match == NULL
729+ || compl_shown_match != compl_shown_match->cp_next))
725730 {
726731 /* BS: Delete one character from "compl_leader". */
727732 if ((c == K_BS || c == Ctrl_H)
@@ -3393,16 +3398,21 @@
33933398 ptr = compl_leader;
33943399 else
33953400 ptr = compl_orig_text;
3396- p = compl_orig_text;
3397- for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; ++temp)
3398- ;
3401+ if (compl_orig_text != NULL)
3402+ {
3403+ p = compl_orig_text;
3404+ for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp];
3405+ ++temp)
3406+ ;
33993407 #ifdef FEAT_MBYTE
3400- if (temp > 0)
3401- temp -= (*mb_head_off)(compl_orig_text, p + temp);
3402-#endif
3403- for (p += temp; *p != NUL; mb_ptr_adv(p))
3404- AppendCharToRedobuff(K_BS);
3405- AppendToRedobuffLit(ptr + temp, -1);
3408+ if (temp > 0)
3409+ temp -= (*mb_head_off)(compl_orig_text, p + temp);
3410+#endif
3411+ for (p += temp; *p != NUL; mb_ptr_adv(p))
3412+ AppendCharToRedobuff(K_BS);
3413+ }
3414+ if (ptr != NULL)
3415+ AppendToRedobuffLit(ptr + temp, -1);
34063416 }
34073417
34083418 #ifdef FEAT_CINDENT
@@ -4650,10 +4660,18 @@
46504660 (int)STRLEN(compl_pattern), curs_col);
46514661 if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
46524662 || compl_xp.xp_context == EXPAND_NOTHING)
4653- return FAIL;
4654- startcol = (int)(compl_xp.xp_pattern - compl_pattern);
4655- compl_col = startcol;
4656- compl_length = curs_col - startcol;
4663+ {
4664+ compl_col = curs_col;
4665+ compl_length = 0;
4666+ vim_free(compl_pattern);
4667+ compl_pattern = NULL;
4668+ }
4669+ else
4670+ {
4671+ startcol = (int)(compl_xp.xp_pattern - compl_pattern);
4672+ compl_col = startcol;
4673+ compl_length = curs_col - startcol;
4674+ }
46574675 }
46584676 else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
46594677 {
@@ -4707,11 +4725,17 @@
47074725 else
47084726 compl_col = spell_word_start(startcol);
47094727 if (compl_col >= (colnr_T)startcol)
4710- return FAIL;
4711- spell_expand_check_cap(compl_col);
4728+ {
4729+ compl_length = 0;
4730+ compl_col = curs_col;
4731+ }
4732+ else
4733+ {
4734+ spell_expand_check_cap(compl_col);
4735+ compl_length = (int)curs_col - compl_col;
4736+ }
47124737 /* Need to obtain "line" again, it may have become invalid. */
47134738 line = ml_get(curwin->w_cursor.lnum);
4714- compl_length = (int)curs_col - compl_col;
47154739 compl_pattern = vim_strnsave(line + compl_col, compl_length);
47164740 if (compl_pattern == NULL)
47174741 #endif
diff -r 354ea37841d1 -r 2e1e9b708941 src/version.c
--- a/src/version.c Tue Jun 20 19:10:43 2006 +0000
+++ b/src/version.c Thu Jun 22 15:13:21 2006 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 23,
671+/**/
670672 22,
671673 /**/
672674 21,
Afficher sur ancien navigateur de dépôt.