@@ -28,7 +28,7 @@ static yankreg_T *y_current; // ptr to current yankreg
2828static int y_append ; // TRUE when appending
2929static yankreg_T * y_previous = NULL ; // ptr to last written yankreg
3030
31- static int stuff_yank (int , char_u * , size_t );
31+ static int stuff_yank (int , char_u * );
3232static void put_reedit_in_typebuf (int silent );
3333static int put_in_typebuf (char_u * s , int esc , int colon , int silent );
3434static int yank_copy_line (struct block_def * bd , long y_idx , int exclude_trailing_space );
@@ -419,7 +419,7 @@ do_record(int c)
419419 old_y_previous = y_previous ;
420420 old_y_current = y_current ;
421421
422- retval = stuff_yank (regname , p , get_recorded_len () );
422+ retval = stuff_yank (regname , p );
423423
424424 y_previous = old_y_previous ;
425425 y_current = old_y_current ;
@@ -435,8 +435,10 @@ do_record(int c)
435435 * return FAIL for failure, OK otherwise
436436 */
437437 static int
438- stuff_yank (int regname , char_u * p , size_t plen )
438+ stuff_yank (int regname , char_u * p )
439439{
440+ size_t plen ;
441+
440442 // check for read-only register
441443 if (regname != 0 && !valid_yank_reg (regname , TRUE))
442444 {
@@ -449,6 +451,7 @@ stuff_yank(int regname, char_u *p, size_t plen)
449451 return OK ;
450452 }
451453
454+ plen = STRLEN (p );
452455 get_yank_register (regname , TRUE);
453456 if (y_append && y_current -> y_array != NULL )
454457 {
0 commit comments