|
Karsten Hopp |
1a1ca1 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
1a1ca1 |
Subject: Patch 7.2.026
|
|
Karsten Hopp |
1a1ca1 |
Fcc: outbox
|
|
Karsten Hopp |
1a1ca1 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
1a1ca1 |
Mime-Version: 1.0
|
|
Karsten Hopp |
1a1ca1 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
1a1ca1 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
1a1ca1 |
------------
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
Patch 7.2.026 (after 7.2.010)
|
|
Karsten Hopp |
1a1ca1 |
Problem: "K" doesn't use the length of the identifier but uses the rest of
|
|
Karsten Hopp |
1a1ca1 |
the line.
|
|
Karsten Hopp |
1a1ca1 |
Solution: Copy the desired number of characters first.
|
|
Karsten Hopp |
1a1ca1 |
Files: src/normal.c
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
*** ../vim-7.2.025/src/normal.c Thu Oct 2 22:55:17 2008
|
|
Karsten Hopp |
1a1ca1 |
--- src/normal.c Sat Nov 1 13:41:03 2008
|
|
Karsten Hopp |
1a1ca1 |
***************
|
|
Karsten Hopp |
1a1ca1 |
*** 183,188 ****
|
|
Karsten Hopp |
1a1ca1 |
--- 183,190 ----
|
|
Karsten Hopp |
1a1ca1 |
static void nv_cursorhold __ARGS((cmdarg_T *cap));
|
|
Karsten Hopp |
1a1ca1 |
#endif
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
+ static char *e_noident = N_("E349: No identifier under cursor");
|
|
Karsten Hopp |
1a1ca1 |
+
|
|
Karsten Hopp |
1a1ca1 |
/*
|
|
Karsten Hopp |
1a1ca1 |
* Function to be called for a Normal or Visual mode command.
|
|
Karsten Hopp |
1a1ca1 |
* The argument is a cmdarg_T.
|
|
Karsten Hopp |
1a1ca1 |
***************
|
|
Karsten Hopp |
1a1ca1 |
*** 3510,3516 ****
|
|
Karsten Hopp |
1a1ca1 |
if (find_type & FIND_STRING)
|
|
Karsten Hopp |
1a1ca1 |
EMSG(_("E348: No string under cursor"));
|
|
Karsten Hopp |
1a1ca1 |
else
|
|
Karsten Hopp |
1a1ca1 |
! EMSG(_("E349: No identifier under cursor"));
|
|
Karsten Hopp |
1a1ca1 |
return 0;
|
|
Karsten Hopp |
1a1ca1 |
}
|
|
Karsten Hopp |
1a1ca1 |
ptr += col;
|
|
Karsten Hopp |
1a1ca1 |
--- 3512,3518 ----
|
|
Karsten Hopp |
1a1ca1 |
if (find_type & FIND_STRING)
|
|
Karsten Hopp |
1a1ca1 |
EMSG(_("E348: No string under cursor"));
|
|
Karsten Hopp |
1a1ca1 |
else
|
|
Karsten Hopp |
1a1ca1 |
! EMSG(_(e_noident));
|
|
Karsten Hopp |
1a1ca1 |
return 0;
|
|
Karsten Hopp |
1a1ca1 |
}
|
|
Karsten Hopp |
1a1ca1 |
ptr += col;
|
|
Karsten Hopp |
1a1ca1 |
***************
|
|
Karsten Hopp |
1a1ca1 |
*** 5472,5479 ****
|
|
Karsten Hopp |
1a1ca1 |
{
|
|
Karsten Hopp |
1a1ca1 |
/* An external command will probably use an argument starting
|
|
Karsten Hopp |
1a1ca1 |
* with "-" as an option. To avoid trouble we skip the "-". */
|
|
Karsten Hopp |
1a1ca1 |
! while (*ptr == '-')
|
|
Karsten Hopp |
1a1ca1 |
++ptr;
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
/* When a count is given, turn it into a range. Is this
|
|
Karsten Hopp |
1a1ca1 |
* really what we want? */
|
|
Karsten Hopp |
1a1ca1 |
--- 5474,5490 ----
|
|
Karsten Hopp |
1a1ca1 |
{
|
|
Karsten Hopp |
1a1ca1 |
/* An external command will probably use an argument starting
|
|
Karsten Hopp |
1a1ca1 |
* with "-" as an option. To avoid trouble we skip the "-". */
|
|
Karsten Hopp |
1a1ca1 |
! while (*ptr == '-' && n > 0)
|
|
Karsten Hopp |
1a1ca1 |
! {
|
|
Karsten Hopp |
1a1ca1 |
++ptr;
|
|
Karsten Hopp |
1a1ca1 |
+ --n;
|
|
Karsten Hopp |
1a1ca1 |
+ }
|
|
Karsten Hopp |
1a1ca1 |
+ if (n == 0)
|
|
Karsten Hopp |
1a1ca1 |
+ {
|
|
Karsten Hopp |
1a1ca1 |
+ EMSG(_(e_noident)); /* found dashes only */
|
|
Karsten Hopp |
1a1ca1 |
+ vim_free(buf);
|
|
Karsten Hopp |
1a1ca1 |
+ return;
|
|
Karsten Hopp |
1a1ca1 |
+ }
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
/* When a count is given, turn it into a range. Is this
|
|
Karsten Hopp |
1a1ca1 |
* really what we want? */
|
|
Karsten Hopp |
1a1ca1 |
***************
|
|
Karsten Hopp |
1a1ca1 |
*** 5520,5526 ****
|
|
Karsten Hopp |
1a1ca1 |
--- 5531,5539 ----
|
|
Karsten Hopp |
1a1ca1 |
if (cmdchar == 'K' && !kp_help)
|
|
Karsten Hopp |
1a1ca1 |
{
|
|
Karsten Hopp |
1a1ca1 |
/* Escape the argument properly for a shell command */
|
|
Karsten Hopp |
1a1ca1 |
+ ptr = vim_strnsave(ptr, n);
|
|
Karsten Hopp |
1a1ca1 |
p = vim_strsave_shellescape(ptr, TRUE);
|
|
Karsten Hopp |
1a1ca1 |
+ vim_free(ptr);
|
|
Karsten Hopp |
1a1ca1 |
if (p == NULL)
|
|
Karsten Hopp |
1a1ca1 |
{
|
|
Karsten Hopp |
1a1ca1 |
vim_free(buf);
|
|
Karsten Hopp |
1a1ca1 |
*** ../vim-7.2.025/src/version.c Thu Oct 2 22:55:17 2008
|
|
Karsten Hopp |
1a1ca1 |
--- src/version.c Sat Nov 1 13:50:53 2008
|
|
Karsten Hopp |
1a1ca1 |
***************
|
|
Karsten Hopp |
1a1ca1 |
*** 678,679 ****
|
|
Karsten Hopp |
1a1ca1 |
--- 678,681 ----
|
|
Karsten Hopp |
1a1ca1 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
1a1ca1 |
+ /**/
|
|
Karsten Hopp |
1a1ca1 |
+ 26,
|
|
Karsten Hopp |
1a1ca1 |
/**/
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
--
|
|
Karsten Hopp |
1a1ca1 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
1a1ca1 |
161. You get up before the sun rises to check your e-mail, and you
|
|
Karsten Hopp |
1a1ca1 |
find yourself in the very same chair long after the sun has set.
|
|
Karsten Hopp |
1a1ca1 |
|
|
Karsten Hopp |
1a1ca1 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
1a1ca1 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
1a1ca1 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
1a1ca1 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|