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