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.0 / 7.0.042 < prev    next >
Encoding:
Internet Message Format  |  2006-07-22  |  1.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.0.042
  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 7.0.042
  11. Problem:    When pasting a block of text in Insert mode Vim hangs or crashes.
  12.         (Noam Halevy)
  13. Solution:   Avoid that the cursor is positioned past the NUL of a line.
  14. Files:        src/ops.c
  15.  
  16.  
  17. *** ../vim-7.0.041/src/ops.c    Tue Jun 20 20:29:13 2006
  18. --- src/ops.c    Sun Jul 23 22:36:39 2006
  19. ***************
  20. *** 3493,3500 ****
  21. --- 3493,3507 ----
  22.   # endif
  23.       if (flags & PUT_CURSEND)
  24.       {
  25. +         colnr_T len;
  26.           curwin->w_cursor = curbuf->b_op_end;
  27.           curwin->w_cursor.col++;
  28. +         /* in Insert mode we might be after the NUL, correct for that */
  29. +         len = (colnr_T)STRLEN(ml_get_curline());
  30. +         if (curwin->w_cursor.col > len)
  31. +         curwin->w_cursor.col = len;
  32.       }
  33.       else
  34.           curwin->w_cursor.lnum = lnum;
  35. *** ../vim-7.0.041/src/version.c    Sun Jul 23 22:07:55 2006
  36. --- src/version.c    Sun Jul 23 22:35:13 2006
  37. ***************
  38. *** 668,669 ****
  39. --- 668,671 ----
  40.   {   /* Add new patch number below this line */
  41. + /**/
  42. +     42,
  43.   /**/
  44.  
  45. -- 
  46. hundred-and-one symptoms of being an internet addict:
  47. 45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
  48.  
  49.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  50. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  51. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  52.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  53.