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 / 6.0.174 < prev    next >
Encoding:
Internet Message Format  |  2002-02-03  |  2.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.174
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.174
  11. Problem:    After using "gd" or "gD" the search direction for "n" may still be
  12.         backwards. (Servatius Brandt)
  13. Solution:   Reset the search direction to forward.
  14. Files:        src/normal.c, src/search.c, src/proto/search.pro
  15.  
  16.  
  17. *** ../vim60.173/src/normal.c    Mon Jan 21 12:52:54 2002
  18. --- src/normal.c    Mon Feb  4 13:09:02 2002
  19. ***************
  20. *** 3665,3670 ****
  21. --- 3665,3672 ----
  22.       if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP)
  23.           foldOpenCursor();
  24.   #endif
  25. +     /* "n" searches forward now */
  26. +     reset_search_dir();
  27.       }
  28.   
  29.       vim_free(pat);
  30. *** ../vim60.173/src/search.c    Mon Nov  5 13:16:21 2001
  31. --- src/search.c    Mon Feb  4 13:08:13 2002
  32. ***************
  33. *** 322,327 ****
  34. --- 322,336 ----
  35.       return spats[last_idx].pat;
  36.   }
  37.   
  38. + /*
  39. +  * Reset search direction to forward.  For "gd" and "gD" commands.
  40. +  */
  41. +     void
  42. + reset_search_dir()
  43. + {
  44. +     spats[0].off.dir = '/';
  45. + }
  46.   #if defined(FEAT_EVAL) || defined(FEAT_VIMINFO)
  47.   /*
  48.    * Set the last search pattern.  For ":let @/ =" and viminfo.
  49. *** ../vim60.173/src/proto/search.pro    Tue Sep 25 21:49:24 2001
  50. --- src/proto/search.pro    Mon Feb  4 13:09:49 2002
  51. ***************
  52. *** 5,10 ****
  53. --- 5,11 ----
  54.   void restore_search_patterns __ARGS((void));
  55.   int ignorecase __ARGS((char_u *pat));
  56.   char_u *last_search_pat __ARGS((void));
  57. + void reset_search_dir __ARGS((void));
  58.   void set_last_search_pat __ARGS((char_u *s, int idx, int magic, int setlast));
  59.   void last_pat_prog __ARGS((regmmatch_T *regmatch));
  60.   int searchit __ARGS((win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *str, long count, int options, int pat_use));
  61. *** ../vim60.173/src/version.c    Mon Feb  4 12:54:38 2002
  62. --- src/version.c    Mon Feb  4 13:13:47 2002
  63. ***************
  64. *** 608,609 ****
  65. --- 608,611 ----
  66.   {   /* Add new patch number below this line */
  67. + /**/
  68. +     174,
  69.   /**/
  70.  
  71. -- 
  72. hundred-and-one symptoms of being an internet addict:
  73. 186. You overstay in the office so you can have more time surfing the net.
  74.  
  75.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  76. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  77.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  78.