diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-29 23:02:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-29 23:02:21 +0200 |
commit | cf070112ca2a6ac9ec5466be1cdc667f6abe8fd0 (patch) | |
tree | 241db85e804fce8aee0ba8c749a8cd472d65d232 /src/textprop.c | |
parent | d034220c54c63daaa2841e97b653842a47f5e90e (diff) | |
download | vim-git-cf070112ca2a6ac9ec5466be1cdc667f6abe8fd0.tar.gz |
patch 8.2.1092: not checking if saving for undo succeedsv8.2.1092
Problem: Not checking if saving for undo succeeds.
Solution: Bail out if u_savesub() returns FAIL.
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c index 2145db262..0645e1fd7 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1350,8 +1350,9 @@ adjust_prop_columns( if (res.dirty) { // Save for undo if requested and not done yet. - if ((flags & APC_SAVE_FOR_UNDO) && !dirty) - u_savesub(lnum); + if ((flags & APC_SAVE_FOR_UNDO) && !dirty + && u_savesub(lnum) == FAIL) + return FALSE; dirty = TRUE; } if (res.can_drop) |