diff options
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 1c0b7aa669..8324db37c6 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -89,6 +89,7 @@ #include "nvim/change.h" #include "nvim/cursor.h" #include "nvim/edit.h" +#include "nvim/ex_getln.h" #include "nvim/extmark.h" #include "nvim/fileio.h" #include "nvim/fold.h" @@ -1954,6 +1955,11 @@ void undo_time(long step, bool sec, bool file, bool absolute) bool above = false; bool 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); |