File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -761,7 +761,7 @@ emsgn(char_u *s, long n)
761761 void
762762iemsg (char_u * s )
763763{
764- msg (s );
764+ emsg (s );
765765#ifdef ABORT_ON_INTERNAL_ERROR
766766 abort ();
767767#endif
@@ -4993,7 +4993,7 @@ vim_vsnprintf_typval(
49934993 zero_padding = 0 ;
49944994 }
49954995 else
4996- {
4996+ {
49974997 /* Regular float number */
49984998 format [0 ] = '%' ;
49994999 l = 1 ;
@@ -5016,7 +5016,7 @@ vim_vsnprintf_typval(
50165016 format [l + 1 ] = NUL ;
50175017
50185018 str_arg_l = sprintf (tmp , format , f );
5019- }
5019+ }
50205020
50215021 if (remove_trailing_zeroes )
50225022 {
Original file line number Diff line number Diff line change @@ -2457,7 +2457,7 @@ del_chars(long count, int fixpos)
24572457 * If "fixpos" is TRUE, don't leave the cursor on the NUL after the line.
24582458 * Caller must have prepared for undo.
24592459 *
2460- * return FAIL for failure, OK otherwise
2460+ * Return FAIL for failure, OK otherwise.
24612461 */
24622462 int
24632463del_bytes (
@@ -2476,12 +2476,21 @@ del_bytes(
24762476 oldp = ml_get (lnum );
24772477 oldlen = (int )STRLEN (oldp );
24782478
2479- /*
2480- * Can't do anything when the cursor is on the NUL after the line.
2481- */
2479+ /* Can't do anything when the cursor is on the NUL after the line. */
24822480 if (col >= oldlen )
24832481 return FAIL ;
24842482
2483+ /* If "count" is zero there is nothing to do. */
2484+ if (count == 0 )
2485+ return OK ;
2486+
2487+ /* If "count" is negative the caller must be doing something wrong. */
2488+ if (count < 1 )
2489+ {
2490+ IEMSGN ("E950: Invalid count for del_bytes(): %ld" , count );
2491+ return FAIL ;
2492+ }
2493+
24852494#ifdef FEAT_MBYTE
24862495 /* If 'delcombine' is set and deleting (less than) one character, only
24872496 * delete the last combining character. */
Original file line number Diff line number Diff line change @@ -771,6 +771,8 @@ static char *(features[]) =
771771
772772static int included_patches [] =
773773{ /* Add new patch number below this line */
774+ /**/
775+ 1468 ,
774776/**/
775777 1467 ,
776778/**/
You can’t perform that action at this time.
0 commit comments