diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-07 07:21:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 07:21:50 +0800 |
commit | 5e84db5c90db60f68fe69b3585ba742d1a872b90 (patch) | |
tree | ce06952a02c3768eba6180dc24d77421176d62ff /src/nvim/undo.c | |
parent | 4ffe5d018919d3fbea21e667f09f14b9751f9cd5 (diff) | |
parent | d4db87f4932a3a994cd5364c1cf85f0913a37070 (diff) | |
download | rneovim-5e84db5c90db60f68fe69b3585ba742d1a872b90.tar.gz rneovim-5e84db5c90db60f68fe69b3585ba742d1a872b90.tar.bz2 rneovim-5e84db5c90db60f68fe69b3585ba742d1a872b90.zip |
Merge pull request #19261 from zeertzjq/vim-8.2.5023
vim-patch:8.2.{5023,5043,5044}: substitute textlock fixes
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); |