diff --git a/7.3.053 b/7.3.053 new file mode 100644 index 0000000..687b39d --- /dev/null +++ b/7.3.053 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.053 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.053 +Problem: complete() function doesn't reset complete direction. Can't use + an empty string in the list of matches. +Solution: Set compl_direction to FORWARD. Add "empty" key to allow empty + words. (Kikuchan) +Files: src/edit.c + + +*** ../vim-7.3.052/src/edit.c 2010-11-10 16:54:16.000000000 +0100 +--- src/edit.c 2010-11-10 17:03:23.000000000 +0100 +*************** +*** 2662,2667 **** +--- 2662,2668 ---- + if (stop_arrow() == FAIL) + return; + ++ compl_direction = FORWARD; + if (startcol > curwin->w_cursor.col) + startcol = curwin->w_cursor.col; + compl_col = startcol; +*************** +*** 3909,3914 **** +--- 3910,3916 ---- + char_u *word; + int icase = FALSE; + int adup = FALSE; ++ int aempty = FALSE; + char_u *(cptext[CPT_COUNT]); + + if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) +*************** +*** 3926,3938 **** + icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase"); + if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL) + adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup"); + } + else + { + word = get_tv_string_chk(tv); + vim_memset(cptext, 0, sizeof(cptext)); + } +! if (word == NULL || *word == NUL) + return FAIL; + return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup); + } +--- 3928,3942 ---- + icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase"); + if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL) + adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup"); ++ if (get_dict_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL) ++ aempty = get_dict_number(tv->vval.v_dict, (char_u *)"empty"); + } + else + { + word = get_tv_string_chk(tv); + vim_memset(cptext, 0, sizeof(cptext)); + } +! if (word == NULL || (!aempty && *word == NUL)) + return FAIL; + return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup); + } +*** ../vim-7.3.052/src/version.c 2010-11-10 16:54:16.000000000 +0100 +--- src/version.c 2010-11-10 17:10:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 53, + /**/ + +-- +BEDEVERE: How do you know so much about swallows? +ARTHUR: Well you have to know these things when you're a king, you know. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 ///