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.148 < prev    next >
Encoding:
Internet Message Format  |  2002-01-21  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.148
  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.148
  11. Problem:    After "p" in an empty line, `[ goes to the second character.
  12.         (Kontra Gergely)
  13. Solution:   Don't increment the column number in an empty line.
  14. Files:        src/ops.c
  15.  
  16.  
  17. *** ../vim60.147/src/ops.c    Tue Nov  6 15:54:13 2001
  18. --- src/ops.c    Tue Jan 22 16:36:28 2002
  19. ***************
  20. *** 2809,2828 ****
  21.       orig_indent = get_indent();
  22.   
  23.       curbuf->b_op_start = curwin->w_cursor;    /* default for '[ mark */
  24. -     if (dir == FORWARD)
  25. -     {
  26. -     /* move to the start of the next (multi-byte) character */
  27. - #ifdef FEAT_MBYTE
  28. -     if (has_mbyte)
  29. -     {
  30. -         bytelen = (*mb_ptr2len_check)(ml_get_cursor());
  31. -         curbuf->b_op_start.col += bytelen;
  32. -     }
  33. -     else
  34. - #endif
  35. -         curbuf->b_op_start.col++;
  36. -     }
  37.       curbuf->b_op_end = curwin->w_cursor;    /* default for '] mark */
  38.   
  39.       /*
  40. --- 2809,2814 ----
  41. ***************
  42. *** 2834,2840 ****
  43.       (void)stuff_inserted((dir == FORWARD ? (count == -1 ? 'o' : 'a') :
  44.                       (count == -1 ? 'O' : 'i')), count, FALSE);
  45.       /* Putting the text is done later, so can't really move the cursor to
  46. !      * the nex character.  Use "l" to simulate it. */
  47.       if ((flags & PUT_CURSEND) && gchar_cursor() != NUL)
  48.           stuffcharReadbuff('l');
  49.       return;
  50. --- 2820,2826 ----
  51.       (void)stuff_inserted((dir == FORWARD ? (count == -1 ? 'o' : 'a') :
  52.                       (count == -1 ? 'O' : 'i')), count, FALSE);
  53.       /* Putting the text is done later, so can't really move the cursor to
  54. !      * the next character.  Use "l" to simulate it. */
  55.       if ((flags & PUT_CURSEND) && gchar_cursor() != NUL)
  56.           stuffcharReadbuff('l');
  57.       return;
  58. ***************
  59. *** 3130,3135 ****
  60. --- 3116,3125 ----
  61.   
  62.       changed_lines(lnum, 0, curwin->w_cursor.lnum, nr_lines);
  63.   
  64. +     /* Set '[ mark. */
  65. +     curbuf->b_op_start = curwin->w_cursor;
  66. +     curbuf->b_op_start.lnum = lnum;
  67.       /* adjust '] mark */
  68.       curbuf->b_op_end.lnum = curwin->w_cursor.lnum - 1;
  69.       curbuf->b_op_end.col = bd.textcol + totlen - 1;
  70. ***************
  71. *** 3178,3183 ****
  72. --- 3168,3174 ----
  73.           }
  74.           }
  75.           new_cursor = curwin->w_cursor;
  76. +         curbuf->b_op_start = curwin->w_cursor;
  77.       }
  78.       /*
  79.        * Line mode: BACKWARD is the same as FORWARD on the previous line
  80. *** ../vim60.147/src/version.c    Tue Jan 22 15:38:17 2002
  81. --- src/version.c    Tue Jan 22 16:47:25 2002
  82. ***************
  83. *** 608,609 ****
  84. --- 608,611 ----
  85.   {   /* Add new patch number below this line */
  86. + /**/
  87. +     148,
  88.   /**/
  89.  
  90. --  
  91. Latest survey shows that 3 out of 4 people make up 75% of the 
  92. world's population.
  93.  
  94.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  95. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  96.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  97.