|
Karsten Hopp |
42e973 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
42e973 |
Subject: Patch 7.3.1260
|
|
Karsten Hopp |
42e973 |
Fcc: outbox
|
|
Karsten Hopp |
42e973 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
42e973 |
Mime-Version: 1.0
|
|
Karsten Hopp |
42e973 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
42e973 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
42e973 |
------------
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
Patch 7.3.1260
|
|
Karsten Hopp |
42e973 |
Problem: User completion does not get the whole command line in the command
|
|
Karsten Hopp |
42e973 |
line window.
|
|
Karsten Hopp |
42e973 |
Solution: Pass on the whole command line. (Daniel Thau)
|
|
Karsten Hopp |
42e973 |
Files: src/ex_getln.c, src/structs.h
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
*** ../vim-7.3.1259/src/ex_getln.c 2013-06-23 16:16:13.000000000 +0200
|
|
Karsten Hopp |
42e973 |
--- src/ex_getln.c 2013-06-29 12:53:30.000000000 +0200
|
|
Karsten Hopp |
42e973 |
***************
|
|
Karsten Hopp |
42e973 |
*** 3729,3734 ****
|
|
Karsten Hopp |
42e973 |
--- 3729,3735 ----
|
|
Karsten Hopp |
42e973 |
#if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
|
|
Karsten Hopp |
42e973 |
xp->xp_arg = NULL;
|
|
Karsten Hopp |
42e973 |
#endif
|
|
Karsten Hopp |
42e973 |
+ xp->xp_line = NULL;
|
|
Karsten Hopp |
42e973 |
}
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
/*
|
|
Karsten Hopp |
42e973 |
***************
|
|
Karsten Hopp |
42e973 |
*** 4378,4383 ****
|
|
Karsten Hopp |
42e973 |
--- 4379,4389 ----
|
|
Karsten Hopp |
42e973 |
int old_char = NUL;
|
|
Karsten Hopp |
42e973 |
char_u *nextcomm;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
+ /* Store the string here so that call_user_expand_func() can get to them
|
|
Karsten Hopp |
42e973 |
+ * easily. */
|
|
Karsten Hopp |
42e973 |
+ xp->xp_line = str;
|
|
Karsten Hopp |
42e973 |
+ xp->xp_col = col;
|
|
Karsten Hopp |
42e973 |
+
|
|
Karsten Hopp |
42e973 |
/*
|
|
Karsten Hopp |
42e973 |
* Avoid a UMR warning from Purify, only save the character if it has been
|
|
Karsten Hopp |
42e973 |
* written before.
|
|
Karsten Hopp |
42e973 |
***************
|
|
Karsten Hopp |
42e973 |
*** 4952,4978 ****
|
|
Karsten Hopp |
42e973 |
void *ret;
|
|
Karsten Hopp |
42e973 |
struct cmdline_info save_ccline;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
! if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0')
|
|
Karsten Hopp |
42e973 |
return NULL;
|
|
Karsten Hopp |
42e973 |
*num_file = 0;
|
|
Karsten Hopp |
42e973 |
*file = NULL;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
! if (ccline.cmdbuff == NULL)
|
|
Karsten Hopp |
42e973 |
{
|
|
Karsten Hopp |
42e973 |
- /* Completion from Insert mode, pass fake arguments. */
|
|
Karsten Hopp |
42e973 |
- keep = 0;
|
|
Karsten Hopp |
42e973 |
- sprintf((char *)num, "%d", (int)STRLEN(xp->xp_pattern));
|
|
Karsten Hopp |
42e973 |
- args[1] = xp->xp_pattern;
|
|
Karsten Hopp |
42e973 |
- }
|
|
Karsten Hopp |
42e973 |
- else
|
|
Karsten Hopp |
42e973 |
- {
|
|
Karsten Hopp |
42e973 |
- /* Completion on the command line, pass real arguments. */
|
|
Karsten Hopp |
42e973 |
keep = ccline.cmdbuff[ccline.cmdlen];
|
|
Karsten Hopp |
42e973 |
ccline.cmdbuff[ccline.cmdlen] = 0;
|
|
Karsten Hopp |
42e973 |
- sprintf((char *)num, "%d", ccline.cmdpos);
|
|
Karsten Hopp |
42e973 |
- args[1] = ccline.cmdbuff;
|
|
Karsten Hopp |
42e973 |
}
|
|
Karsten Hopp |
42e973 |
args[0] = vim_strnsave(xp->xp_pattern, xp->xp_pattern_len);
|
|
Karsten Hopp |
42e973 |
args[2] = num;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
/* Save the cmdline, we don't know what the function may do. */
|
|
Karsten Hopp |
42e973 |
--- 4958,4977 ----
|
|
Karsten Hopp |
42e973 |
void *ret;
|
|
Karsten Hopp |
42e973 |
struct cmdline_info save_ccline;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
! if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0' || xp->xp_line == NULL)
|
|
Karsten Hopp |
42e973 |
return NULL;
|
|
Karsten Hopp |
42e973 |
*num_file = 0;
|
|
Karsten Hopp |
42e973 |
*file = NULL;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
! if (ccline.cmdbuff != NULL)
|
|
Karsten Hopp |
42e973 |
{
|
|
Karsten Hopp |
42e973 |
keep = ccline.cmdbuff[ccline.cmdlen];
|
|
Karsten Hopp |
42e973 |
ccline.cmdbuff[ccline.cmdlen] = 0;
|
|
Karsten Hopp |
42e973 |
}
|
|
Karsten Hopp |
42e973 |
+
|
|
Karsten Hopp |
42e973 |
args[0] = vim_strnsave(xp->xp_pattern, xp->xp_pattern_len);
|
|
Karsten Hopp |
42e973 |
+ args[1] = xp->xp_line;
|
|
Karsten Hopp |
42e973 |
+ sprintf((char *)num, "%d", xp->xp_col);
|
|
Karsten Hopp |
42e973 |
args[2] = num;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
/* Save the cmdline, we don't know what the function may do. */
|
|
Karsten Hopp |
42e973 |
*** ../vim-7.3.1259/src/structs.h 2013-06-12 19:52:11.000000000 +0200
|
|
Karsten Hopp |
42e973 |
--- src/structs.h 2013-06-29 12:47:03.000000000 +0200
|
|
Karsten Hopp |
42e973 |
***************
|
|
Karsten Hopp |
42e973 |
*** 493,498 ****
|
|
Karsten Hopp |
42e973 |
--- 493,500 ----
|
|
Karsten Hopp |
42e973 |
int xp_numfiles; /* number of files found by
|
|
Karsten Hopp |
42e973 |
file name completion */
|
|
Karsten Hopp |
42e973 |
char_u **xp_files; /* list of files */
|
|
Karsten Hopp |
42e973 |
+ char_u *xp_line; /* text being completed */
|
|
Karsten Hopp |
42e973 |
+ int xp_col; /* cursor position in line */
|
|
Karsten Hopp |
42e973 |
} expand_T;
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
/* values for xp_backslash */
|
|
Karsten Hopp |
42e973 |
*** ../vim-7.3.1259/src/version.c 2013-06-29 12:10:22.000000000 +0200
|
|
Karsten Hopp |
42e973 |
--- src/version.c 2013-06-29 12:41:08.000000000 +0200
|
|
Karsten Hopp |
42e973 |
***************
|
|
Karsten Hopp |
42e973 |
*** 730,731 ****
|
|
Karsten Hopp |
42e973 |
--- 730,733 ----
|
|
Karsten Hopp |
42e973 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
42e973 |
+ /**/
|
|
Karsten Hopp |
42e973 |
+ 1260,
|
|
Karsten Hopp |
42e973 |
/**/
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
--
|
|
Karsten Hopp |
42e973 |
This is the polymorph virus! Follow these instructions carefully:
|
|
Karsten Hopp |
42e973 |
1. Send this message to everybody you know.
|
|
Karsten Hopp |
42e973 |
2. Format your harddisk.
|
|
Karsten Hopp |
42e973 |
Thank you for your cooperation in spreading the most powerful virus ever!
|
|
Karsten Hopp |
42e973 |
|
|
Karsten Hopp |
42e973 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
42e973 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
42e973 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
42e973 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|