aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-03-20 10:30:59 +0000
committerGitHub <noreply@github.com>2023-03-20 10:30:59 +0000
commitd8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38 (patch)
tree9354e0f324c274ba9aaae31ddb2269b1a6a54268 /src/nvim/undo.c
parent84027f7515b8ee6f818462f105882fc0052783c4 (diff)
parente5641df6d3fc3bb6c3c55593b6152082bfc561b6 (diff)
downloadrneovim-d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38.tar.gz
rneovim-d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38.tar.bz2
rneovim-d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38.zip
Merge pull request #22634 from lewis6991/feat/tscomment
feat: add vim.filetype.get_option()
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 3902d9c2aa..ad33ba4667 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -96,6 +96,7 @@
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_defs.h"
#include "nvim/ex_cmds_defs.h"
+#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/extmark.h"
#include "nvim/fileio.h"
@@ -300,7 +301,7 @@ bool undo_allowed(buf_T *buf)
// Don't allow changes in the buffer while editing the cmdline. The
// caller of getcmdline() may get confused.
- if (textlock != 0) {
+ if (textlock != 0 || expr_map_locked()) {
emsg(_(e_textlock));
return false;
}