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.1.252 < prev    next >
Encoding:
Internet Message Format  |  2002-11-10  |  2.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.252
  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.1.252
  11. Problem:    "vi}" does not include a line break when the "}" is at the start
  12.         of a following line. (Kamil Burzynski)
  13. Solution:   Include the line break.
  14. Files:        src/search.c
  15.  
  16.  
  17. *** ../vim61.251/src/search.c    Tue Aug 13 21:35:32 2002
  18. --- src/search.c    Mon Nov  4 19:47:37 2002
  19. ***************
  20. *** 3077,3082 ****
  21. --- 3077,3083 ----
  22.       pos_T    *end_pos;
  23.       pos_T    old_start, old_end;
  24.       char_u    *save_cpo;
  25. +     int        sol = FALSE;    /* { at start of line */
  26.   
  27.       old_pos = curwin->w_cursor;
  28.       old_end = curwin->w_cursor;            /* remember where we started */
  29. ***************
  30. *** 3142,3152 ****
  31. --- 3143,3157 ----
  32.       while (!include)
  33.       {
  34.       incl(&start_pos);
  35. +     sol = (curwin->w_cursor.col == 0);
  36.       decl(&curwin->w_cursor);
  37.       if (what == '{')
  38.           while (inindent(1))
  39. +         {
  40. +         sol = TRUE;
  41.           if (decl(&curwin->w_cursor) != 0)
  42.               break;
  43. +         }
  44.   #ifdef FEAT_VISUAL
  45.       /*
  46.        * In Visual mode, when the resulting area is not bigger than what we
  47. ***************
  48. *** 3181,3186 ****
  49. --- 3186,3193 ----
  50.       {
  51.       if (*p_sel == 'e')
  52.           ++curwin->w_cursor.col;
  53. +     if (sol)
  54. +         inc(&curwin->w_cursor);    /* include the line break */
  55.       VIsual = start_pos;
  56.       VIsual_mode = 'v';
  57.       redraw_curbuf_later(INVERTED);    /* update the inversion */
  58. ***************
  59. *** 3191,3197 ****
  60.       {
  61.       oap->start = start_pos;
  62.       oap->motion_type = MCHAR;
  63. !     oap->inclusive = TRUE;
  64.       }
  65.   
  66.       return OK;
  67. --- 3198,3210 ----
  68.       {
  69.       oap->start = start_pos;
  70.       oap->motion_type = MCHAR;
  71. !     if (sol)
  72. !     {
  73. !         incl(&curwin->w_cursor);
  74. !         oap->inclusive = FALSE;
  75. !     }
  76. !     else
  77. !         oap->inclusive = TRUE;
  78.       }
  79.   
  80.       return OK;
  81. *** ../vim61.251/src/version.c    Mon Nov 11 21:25:36 2002
  82. --- src/version.c    Mon Nov 11 21:27:29 2002
  83. ***************
  84. *** 608,609 ****
  85. --- 608,611 ----
  86.   {   /* Add new patch number below this line */
  87. + /**/
  88. +     252,
  89.   /**/
  90.  
  91. -- 
  92. login: yes
  93. password: I don't know, please tell me
  94. password is incorrect
  95. login: yes
  96. password: incorrect
  97.  
  98.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  99. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  100. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  101.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  102.