|
|
8b9a1c |
To: vim_dev@googlegroups.com
|
|
|
8b9a1c |
Subject: Patch 7.4.083
|
|
|
8b9a1c |
Fcc: outbox
|
|
|
8b9a1c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
8b9a1c |
Mime-Version: 1.0
|
|
|
8b9a1c |
Content-Type: text/plain; charset=UTF-8
|
|
|
8b9a1c |
Content-Transfer-Encoding: 8bit
|
|
|
8b9a1c |
------------
|
|
|
8b9a1c |
|
|
|
8b9a1c |
Patch 7.4.083
|
|
|
8b9a1c |
Problem: It's hard to avoid adding a used pattern to the search history.
|
|
|
8b9a1c |
Solution: Add the ":keeppatterns" modifier. (Christian Brabandt)
|
|
|
8b9a1c |
Files: runtime/doc/cmdline.txt, src/ex_cmds.h, src/ex_docmd.c,
|
|
|
8b9a1c |
src/ex_getln.c, src/structs.h
|
|
|
8b9a1c |
|
|
|
8b9a1c |
|
|
|
8b9a1c |
*** ../vim-7.4.082/runtime/doc/cmdline.txt 2013-08-10 13:24:52.000000000 +0200
|
|
|
8b9a1c |
--- runtime/doc/cmdline.txt 2013-11-09 04:26:30.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 356,361 ****
|
|
|
8b9a1c |
--- 356,365 ----
|
|
|
8b9a1c |
List the recent five entries from all histories: >
|
|
|
8b9a1c |
:history all -5,
|
|
|
8b9a1c |
|
|
|
8b9a1c |
+ :keepp[atterns] {command} *:keepp* *:keeppatterns*
|
|
|
8b9a1c |
+ Execute {command}, without adding anything to the search
|
|
|
8b9a1c |
+ history
|
|
|
8b9a1c |
+
|
|
|
8b9a1c |
==============================================================================
|
|
|
8b9a1c |
2. Command-line completion *cmdline-completion*
|
|
|
8b9a1c |
|
|
|
8b9a1c |
*** ../vim-7.4.082/src/ex_cmds.h 2013-06-08 15:08:20.000000000 +0200
|
|
|
8b9a1c |
--- src/ex_cmds.h 2013-11-09 04:26:30.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 477,482 ****
|
|
|
8b9a1c |
--- 477,484 ----
|
|
|
8b9a1c |
NEEDARG|EXTRA|NOTRLCOM),
|
|
|
8b9a1c |
EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier,
|
|
|
8b9a1c |
NEEDARG|EXTRA|NOTRLCOM),
|
|
|
8b9a1c |
+ EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier,
|
|
|
8b9a1c |
+ NEEDARG|EXTRA|NOTRLCOM),
|
|
|
8b9a1c |
EX(CMD_keepalt, "keepalt", ex_wrongmodifier,
|
|
|
8b9a1c |
NEEDARG|EXTRA|NOTRLCOM),
|
|
|
8b9a1c |
EX(CMD_list, "list", ex_print,
|
|
|
8b9a1c |
*** ../vim-7.4.082/src/ex_docmd.c 2013-11-09 03:31:45.000000000 +0100
|
|
|
8b9a1c |
--- src/ex_docmd.c 2013-11-09 04:31:36.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 1843,1848 ****
|
|
|
8b9a1c |
--- 1843,1853 ----
|
|
|
8b9a1c |
cmdmod.keepalt = TRUE;
|
|
|
8b9a1c |
continue;
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
+ if (checkforcmd(&ea.cmd, "keeppatterns", 5))
|
|
|
8b9a1c |
+ {
|
|
|
8b9a1c |
+ cmdmod.keeppatterns = TRUE;
|
|
|
8b9a1c |
+ continue;
|
|
|
8b9a1c |
+ }
|
|
|
8b9a1c |
if (!checkforcmd(&ea.cmd, "keepjumps", 5))
|
|
|
8b9a1c |
break;
|
|
|
8b9a1c |
cmdmod.keepjumps = TRUE;
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 2584,2589 ****
|
|
|
8b9a1c |
--- 2589,2595 ----
|
|
|
8b9a1c |
case CMD_keepalt:
|
|
|
8b9a1c |
case CMD_keepjumps:
|
|
|
8b9a1c |
case CMD_keepmarks:
|
|
|
8b9a1c |
+ case CMD_keeppatterns:
|
|
|
8b9a1c |
case CMD_leftabove:
|
|
|
8b9a1c |
case CMD_let:
|
|
|
8b9a1c |
case CMD_lockmarks:
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 3089,3094 ****
|
|
|
8b9a1c |
--- 3095,3101 ----
|
|
|
8b9a1c |
{"keepalt", 5, FALSE},
|
|
|
8b9a1c |
{"keepjumps", 5, FALSE},
|
|
|
8b9a1c |
{"keepmarks", 3, FALSE},
|
|
|
8b9a1c |
+ {"keeppatterns", 5, FALSE},
|
|
|
8b9a1c |
{"leftabove", 5, FALSE},
|
|
|
8b9a1c |
{"lockmarks", 3, FALSE},
|
|
|
8b9a1c |
{"noautocmd", 3, FALSE},
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 3597,3602 ****
|
|
|
8b9a1c |
--- 3604,3610 ----
|
|
|
8b9a1c |
case CMD_keepalt:
|
|
|
8b9a1c |
case CMD_keepjumps:
|
|
|
8b9a1c |
case CMD_keepmarks:
|
|
|
8b9a1c |
+ case CMD_keeppatterns:
|
|
|
8b9a1c |
case CMD_leftabove:
|
|
|
8b9a1c |
case CMD_lockmarks:
|
|
|
8b9a1c |
case CMD_rightbelow:
|
|
|
8b9a1c |
*** ../vim-7.4.082/src/ex_getln.c 2013-11-05 07:12:59.000000000 +0100
|
|
|
8b9a1c |
--- src/ex_getln.c 2013-11-09 04:26:30.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 5498,5503 ****
|
|
|
8b9a1c |
--- 5498,5506 ----
|
|
|
8b9a1c |
if (hislen == 0) /* no history */
|
|
|
8b9a1c |
return;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
+ if (cmdmod.keeppatterns && histype == HIST_SEARCH)
|
|
|
8b9a1c |
+ return;
|
|
|
8b9a1c |
+
|
|
|
8b9a1c |
/*
|
|
|
8b9a1c |
* Searches inside the same mapping overwrite each other, so that only
|
|
|
8b9a1c |
* the last line is kept. Be careful not to remove a line that was moved
|
|
|
8b9a1c |
*** ../vim-7.4.082/src/structs.h 2013-11-06 05:26:08.000000000 +0100
|
|
|
8b9a1c |
--- src/structs.h 2013-11-09 04:26:30.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 542,547 ****
|
|
|
8b9a1c |
--- 542,548 ----
|
|
|
8b9a1c |
int keepmarks; /* TRUE when ":keepmarks" was used */
|
|
|
8b9a1c |
int keepjumps; /* TRUE when ":keepjumps" was used */
|
|
|
8b9a1c |
int lockmarks; /* TRUE when ":lockmarks" was used */
|
|
|
8b9a1c |
+ int keeppatterns; /* TRUE when ":keeppatterns" was used */
|
|
|
8b9a1c |
# ifdef FEAT_AUTOCMD
|
|
|
8b9a1c |
char_u *save_ei; /* saved value of 'eventignore' */
|
|
|
8b9a1c |
# endif
|
|
|
8b9a1c |
*** ../vim-7.4.082/src/version.c 2013-11-09 03:31:45.000000000 +0100
|
|
|
8b9a1c |
--- src/version.c 2013-11-09 04:29:07.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 740,741 ****
|
|
|
8b9a1c |
--- 740,743 ----
|
|
|
8b9a1c |
{ /* Add new patch number below this line */
|
|
|
8b9a1c |
+ /**/
|
|
|
8b9a1c |
+ 83,
|
|
|
8b9a1c |
/**/
|
|
|
8b9a1c |
|
|
|
8b9a1c |
--
|
|
|
8b9a1c |
I am always surprised in the Linux world how quickly solutions can be
|
|
|
8b9a1c |
obtained. (Imagine sending an email to Bill Gates, asking why Windows
|
|
|
8b9a1c |
crashed, and how to fix it... and then getting an answer that fixed the
|
|
|
8b9a1c |
problem... <0>_<0> !) -- Mark Langdon
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
8b9a1c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
8b9a1c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
8b9a1c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|