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.039 < prev    next >
Encoding:
Internet Message Format  |  2001-10-29  |  3.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.039
  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.039
  11. Problem:    "gP" leaves the cursor in the wrong position when 'virtualedit' is
  12.         used.  Using "c" in blockwise Visual mode leaves the cursor in a
  13.         strange position.
  14. Solution:   For "gP" reset the "coladd" field for the '] mark.  For "c" leave
  15.         the cursor on the last inserted character.
  16. Files:        src/ops.c
  17.  
  18.  
  19. *** ../vim60.38/src/ops.c    Tue Oct 30 11:19:49 2001
  20. --- src/ops.c    Tue Oct 30 14:33:31 2001
  21. ***************
  22. *** 2304,2314 ****
  23.        */
  24.       if ((ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
  25.       {
  26. !         if ((ins_text = alloc_check((unsigned)(ins_len + 1))) != 0)
  27.           {
  28. -         /* put cursor at end of changed text */
  29. -         curwin->w_cursor = oap->end;
  30.           STRNCPY(ins_text, firstline + bd.textcol, ins_len);
  31.           *(ins_text + ins_len) = NUL;
  32.           for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum;
  33. --- 2305,2312 ----
  34.        */
  35.       if ((ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
  36.       {
  37. !         if ((ins_text = alloc_check((unsigned)(ins_len + 1))) != NULL)
  38.           {
  39.           STRNCPY(ins_text, firstline + bd.textcol, ins_len);
  40.           *(ins_text + ins_len) = NUL;
  41.           for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum;
  42. ***************
  43. *** 2331,2341 ****
  44.               mch_memmove(newp + bd.textcol + offset, oldp,
  45.                                   STRLEN(oldp) + 1);
  46.               ml_replace(linenr, newp, FALSE);
  47. -             if (linenr == oap->end.lnum)
  48. -                 curwin->w_cursor.col = bd.textcol + ins_len - 1;
  49.               }
  50.           }
  51. -         curwin->w_cursor.col = oap->start.col;
  52.           check_cursor();
  53.   
  54.           changed_lines(oap->start.lnum + 1, 0, oap->end.lnum + 1, 0L);
  55. --- 2329,2336 ----
  56. ***************
  57. *** 3135,3140 ****
  58. --- 3130,3138 ----
  59.       /* adjust '] mark */
  60.       curbuf->b_op_end.lnum = curwin->w_cursor.lnum - 1;
  61.       curbuf->b_op_end.col = bd.textcol + totlen - 1;
  62. + #ifdef FEAT_VIRTUALEDIT
  63. +     curbuf->b_op_end.coladd = 0;
  64. + #endif
  65.       if (flags & PUT_CURSEND)
  66.       {
  67.           curwin->w_cursor = curbuf->b_op_end;
  68. ***************
  69. *** 3375,3381 ****
  70. --- 3373,3385 ----
  71.           && gchar_cursor() == NUL
  72.           && curwin->w_cursor.col
  73.           && !(restart_edit || (State & INSERT)))
  74. +     {
  75.       --curwin->w_cursor.col;
  76. + #ifdef FEAT_VIRTUALEDIT
  77. +     if (ve_flags == VE_ALL)
  78. +         ++curwin->w_cursor.coladd;
  79. + #endif
  80. +     }
  81.   }
  82.   
  83.   #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) || defined(PROTO)
  84. *** ../vim60.38/src/version.c    Tue Oct 30 11:19:49 2001
  85. --- src/version.c    Tue Oct 30 14:43:04 2001
  86. ***************
  87. *** 608,609 ****
  88. --- 608,611 ----
  89.   {   /* Add new patch number below this line */
  90. + /**/
  91. +     39,
  92.   /**/
  93.  
  94. -- 
  95. BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
  96. ANOTHER MONK:    And St.  Attila raised his hand grenade up on high saying "O
  97.                  Lord bless this thy hand grenade that with it thou mayest
  98.                  blow thine enemies to tiny bits, in thy mercy. "and the Lord
  99.                  did grin and people did feast upon the lambs and sloths and
  100.                  carp and anchovies and orang-utans and breakfast cereals and
  101.                  fruit bats and...
  102. BROTHER MAYNARD: Skip a bit brother ...
  103.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  104.  
  105.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  106. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  107.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  108.