diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-06-27 20:49:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-06-27 20:49:44 +0200 |
commit | f52f9ea8f5fb3df51a308c56f2bf66f735ef3ca7 (patch) | |
tree | 28df043ec3739ec82a80cef96605de5a91e6ba11 /src/ops.c | |
parent | bd87eb38c558521ff709651ac190ffd1b9dee057 (diff) | |
download | vim-git-f52f9ea8f5fb3df51a308c56f2bf66f735ef3ca7.tar.gz |
patch 8.1.0118: duplicate error message for put commandv8.1.0118
Problem: Duplicate error message for put command.
Solution: Check return value of u_save(). (Jason Franklin)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) { |