Patch 7.4.779
Problem: Using CTRL-A in a line without a number moves the cursor. May
cause a crash when at the start of the line. (Urtica Dioica)
Solution: Do not move the cursor if no number was changed.
Files: src/ops.c
*** ../vim-7.4.778/src/ops.c 2015-07-10 22:37:54.312853901 +0200
--- src/ops.c 2015-07-12 14:56:33.707974480 +0200
***************
*** 5404,5409 ****
--- 5404,5410 ----
int lnum = curwin->w_cursor.lnum;
int lnume = curwin->w_cursor.lnum;
int startcol;
+ int did_change = FALSE;
dohex = (vim_strchr(curbuf->b_p_nf, 'x') != NULL); /* "heX" */
dooct = (vim_strchr(curbuf->b_p_nf, 'o') != NULL); /* "Octal" */
***************
*** 5547,5552 ****
--- 5548,5554 ----
#endif
}
curwin->w_cursor.col = col;
+ did_change = TRUE;
(void)del_char(FALSE);
ins_char(firstdigit);
}
***************
*** 5619,5624 ****
--- 5621,5627 ----
* Delete the old number.
*/
curwin->w_cursor.col = col;
+ did_change = TRUE;
todel = length;
c = gchar_cursor();
***************
*** 5713,5719 ****
RLADDSUBFIX(ptr);
#endif
}
! --curwin->w_cursor.col;
return OK;
}
--- 5716,5723 ----
RLADDSUBFIX(ptr);
#endif
}
! if (did_change && curwin->w_cursor.col > 0)
! --curwin->w_cursor.col;
return OK;
}
*** ../vim-7.4.778/src/version.c 2015-07-10 22:37:54.312853901 +0200
--- src/version.c 2015-07-12 15:01:11.605349725 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 779,
/**/
--
Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.