1
0
forked from aniani/vim

patch 8.1.0118: duplicate error message for put command

Problem:    Duplicate error message for put command.
Solution:   Check return value of u_save(). (Jason Franklin)
This commit is contained in:
Bram Moolenaar
2018-06-27 20:49:44 +02:00
parent bd87eb38c5
commit f52f9ea8f5
4 changed files with 53 additions and 4 deletions

View File

@@ -3551,9 +3551,10 @@ do_put(
return;
}
/* Autocommands may be executed when saving lines for undo, which may make
* y_array invalid. Start undo now to avoid that. */
u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1);
/* Autocommands may be executed when saving lines for undo. This might
* make "y_array" invalid, so we start undo now to avoid that. */
if (u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1) == FAIL)
goto end;
if (insert_string != NULL)
{