1
0
forked from aniani/vim

patch 8.2.5023: substitute overwrites allocated buffer

Problem:    Substitute overwrites allocated buffer.
Solution:   Disallow undo when in a substitute command.
This commit is contained in:
Bram Moolenaar
2022-05-26 15:56:23 +01:00
parent 9bcb9ca9c7
commit 338f1fc0ee
4 changed files with 51 additions and 21 deletions

View File

@@ -2327,6 +2327,12 @@ undo_time(
int above = FALSE;
int did_undo = TRUE;
if (text_locked())
{
text_locked_msg();
return;
}
// First make sure the current undoable change is synced.
if (curbuf->b_u_synced == FALSE)
u_sync(TRUE);