patch 8.2.1092: not checking if saving for undo succeeds
Problem: Not checking if saving for undo succeeds.
Solution: Bail out if u_savesub() returns FAIL.
diff --git a/src/textprop.c b/src/textprop.c
index 2145db2..0645e1f 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1350,8 +1350,9 @@
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)