home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.083 < prev    next >
Encoding:
Internet Message Format  |  2013-11-08  |  4.4 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.083
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.083
  11. Problem:    It's hard to avoid adding a used pattern to the search history.
  12. Solution:   Add the ":keeppatterns" modifier. (Christian Brabandt)
  13. Files:      runtime/doc/cmdline.txt, src/ex_cmds.h, src/ex_docmd.c,
  14.             src/ex_getln.c, src/structs.h
  15.  
  16.  
  17. *** ../vim-7.4.082/runtime/doc/cmdline.txt    2013-08-10 13:24:52.000000000 +0200
  18. --- runtime/doc/cmdline.txt    2013-11-09 04:26:30.000000000 +0100
  19. ***************
  20. *** 356,361 ****
  21. --- 356,365 ----
  22.           List the recent five entries from all histories: >
  23.               :history all -5,
  24.   
  25. + :keepp[atterns] {command}            *:keepp* *:keeppatterns*
  26. +         Execute {command}, without adding anything to the search
  27. +         history
  28.   ==============================================================================
  29.   2. Command-line completion                *cmdline-completion*
  30.   
  31. *** ../vim-7.4.082/src/ex_cmds.h    2013-06-08 15:08:20.000000000 +0200
  32. --- src/ex_cmds.h    2013-11-09 04:26:30.000000000 +0100
  33. ***************
  34. *** 477,482 ****
  35. --- 477,484 ----
  36.               NEEDARG|EXTRA|NOTRLCOM),
  37.   EX(CMD_keepjumps,    "keepjumps",    ex_wrongmodifier,
  38.               NEEDARG|EXTRA|NOTRLCOM),
  39. + EX(CMD_keeppatterns,    "keeppatterns",    ex_wrongmodifier,
  40. +             NEEDARG|EXTRA|NOTRLCOM),
  41.   EX(CMD_keepalt,        "keepalt",    ex_wrongmodifier,
  42.               NEEDARG|EXTRA|NOTRLCOM),
  43.   EX(CMD_list,        "list",        ex_print,
  44. *** ../vim-7.4.082/src/ex_docmd.c    2013-11-09 03:31:45.000000000 +0100
  45. --- src/ex_docmd.c    2013-11-09 04:31:36.000000000 +0100
  46. ***************
  47. *** 1843,1848 ****
  48. --- 1843,1853 ----
  49.                   cmdmod.keepalt = TRUE;
  50.                   continue;
  51.               }
  52. +             if (checkforcmd(&ea.cmd, "keeppatterns", 5))
  53. +             {
  54. +                 cmdmod.keeppatterns = TRUE;
  55. +                 continue;
  56. +             }
  57.               if (!checkforcmd(&ea.cmd, "keepjumps", 5))
  58.                   break;
  59.               cmdmod.keepjumps = TRUE;
  60. ***************
  61. *** 2584,2589 ****
  62. --- 2589,2595 ----
  63.           case CMD_keepalt:
  64.           case CMD_keepjumps:
  65.           case CMD_keepmarks:
  66. +         case CMD_keeppatterns:
  67.           case CMD_leftabove:
  68.           case CMD_let:
  69.           case CMD_lockmarks:
  70. ***************
  71. *** 3089,3094 ****
  72. --- 3095,3101 ----
  73.       {"keepalt", 5, FALSE},
  74.       {"keepjumps", 5, FALSE},
  75.       {"keepmarks", 3, FALSE},
  76. +     {"keeppatterns", 5, FALSE},
  77.       {"leftabove", 5, FALSE},
  78.       {"lockmarks", 3, FALSE},
  79.       {"noautocmd", 3, FALSE},
  80. ***************
  81. *** 3597,3602 ****
  82. --- 3604,3610 ----
  83.       case CMD_keepalt:
  84.       case CMD_keepjumps:
  85.       case CMD_keepmarks:
  86. +     case CMD_keeppatterns:
  87.       case CMD_leftabove:
  88.       case CMD_lockmarks:
  89.       case CMD_rightbelow:
  90. *** ../vim-7.4.082/src/ex_getln.c    2013-11-05 07:12:59.000000000 +0100
  91. --- src/ex_getln.c    2013-11-09 04:26:30.000000000 +0100
  92. ***************
  93. *** 5498,5503 ****
  94. --- 5498,5506 ----
  95.       if (hislen == 0)        /* no history */
  96.       return;
  97.   
  98. +     if (cmdmod.keeppatterns && histype == HIST_SEARCH)
  99. +     return;
  100.       /*
  101.        * Searches inside the same mapping overwrite each other, so that only
  102.        * the last line is kept.  Be careful not to remove a line that was moved
  103. *** ../vim-7.4.082/src/structs.h    2013-11-06 05:26:08.000000000 +0100
  104. --- src/structs.h    2013-11-09 04:26:30.000000000 +0100
  105. ***************
  106. *** 542,547 ****
  107. --- 542,548 ----
  108.       int        keepmarks;        /* TRUE when ":keepmarks" was used */
  109.       int        keepjumps;        /* TRUE when ":keepjumps" was used */
  110.       int        lockmarks;        /* TRUE when ":lockmarks" was used */
  111. +     int        keeppatterns;        /* TRUE when ":keeppatterns" was used */
  112.   # ifdef FEAT_AUTOCMD
  113.       char_u    *save_ei;        /* saved value of 'eventignore' */
  114.   # endif
  115. *** ../vim-7.4.082/src/version.c    2013-11-09 03:31:45.000000000 +0100
  116. --- src/version.c    2013-11-09 04:29:07.000000000 +0100
  117. ***************
  118. *** 740,741 ****
  119. --- 740,743 ----
  120.   {   /* Add new patch number below this line */
  121. + /**/
  122. +     83,
  123.   /**/
  124.  
  125. -- 
  126. I am always surprised in the Linux world how quickly solutions can be
  127. obtained.  (Imagine sending an email to Bill Gates, asking why Windows
  128. crashed, and how to fix it...  and then getting an answer that fixed the
  129. problem... <0>_<0> !)                      -- Mark Langdon
  130.  
  131.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  132. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  133. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  134.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  135.