|
Karsten Hopp |
9a5538 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
9a5538 |
Subject: Patch 7.0.042
|
|
Karsten Hopp |
9a5538 |
Fcc: outbox
|
|
Karsten Hopp |
9a5538 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
9a5538 |
Mime-Version: 1.0
|
|
Karsten Hopp |
9a5538 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
9a5538 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
9a5538 |
------------
|
|
Karsten Hopp |
9a5538 |
|
|
Karsten Hopp |
9a5538 |
Patch 7.0.042
|
|
Karsten Hopp |
9a5538 |
Problem: When pasting a block of text in Insert mode Vim hangs or crashes.
|
|
Karsten Hopp |
9a5538 |
(Noam Halevy)
|
|
Karsten Hopp |
9a5538 |
Solution: Avoid that the cursor is positioned past the NUL of a line.
|
|
Karsten Hopp |
9a5538 |
Files: src/ops.c
|
|
Karsten Hopp |
9a5538 |
|
|
Karsten Hopp |
9a5538 |
|
|
Karsten Hopp |
9a5538 |
*** ../vim-7.0.041/src/ops.c Tue Jun 20 20:29:13 2006
|
|
Karsten Hopp |
9a5538 |
--- src/ops.c Sun Jul 23 22:36:39 2006
|
|
Karsten Hopp |
9a5538 |
***************
|
|
Karsten Hopp |
9a5538 |
*** 3493,3500 ****
|
|
Karsten Hopp |
9a5538 |
--- 3493,3507 ----
|
|
Karsten Hopp |
9a5538 |
# endif
|
|
Karsten Hopp |
9a5538 |
if (flags & PUT_CURSEND)
|
|
Karsten Hopp |
9a5538 |
{
|
|
Karsten Hopp |
9a5538 |
+ colnr_T len;
|
|
Karsten Hopp |
9a5538 |
+
|
|
Karsten Hopp |
9a5538 |
curwin->w_cursor = curbuf->b_op_end;
|
|
Karsten Hopp |
9a5538 |
curwin->w_cursor.col++;
|
|
Karsten Hopp |
9a5538 |
+
|
|
Karsten Hopp |
9a5538 |
+ /* in Insert mode we might be after the NUL, correct for that */
|
|
Karsten Hopp |
9a5538 |
+ len = (colnr_T)STRLEN(ml_get_curline());
|
|
Karsten Hopp |
9a5538 |
+ if (curwin->w_cursor.col > len)
|
|
Karsten Hopp |
9a5538 |
+ curwin->w_cursor.col = len;
|
|
Karsten Hopp |
9a5538 |
}
|
|
Karsten Hopp |
9a5538 |
else
|
|
Karsten Hopp |
9a5538 |
curwin->w_cursor.lnum = lnum;
|
|
Karsten Hopp |
9a5538 |
*** ../vim-7.0.041/src/version.c Sun Jul 23 22:07:55 2006
|
|
Karsten Hopp |
9a5538 |
--- src/version.c Sun Jul 23 22:35:13 2006
|
|
Karsten Hopp |
9a5538 |
***************
|
|
Karsten Hopp |
9a5538 |
*** 668,669 ****
|
|
Karsten Hopp |
9a5538 |
--- 668,671 ----
|
|
Karsten Hopp |
9a5538 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
9a5538 |
+ /**/
|
|
Karsten Hopp |
9a5538 |
+ 42,
|
|
Karsten Hopp |
9a5538 |
/**/
|
|
Karsten Hopp |
9a5538 |
|
|
Karsten Hopp |
9a5538 |
--
|
|
Karsten Hopp |
9a5538 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
9a5538 |
45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
|
|
Karsten Hopp |
9a5538 |
|
|
Karsten Hopp |
9a5538 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
9a5538 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
9a5538 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
9a5538 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|