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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user