aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mapping.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/mapping.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/mapping.c')
-rw-r--r--src/nvim/mapping.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c
index 3c4ce0ee2b..5cedc5e97d 100644
--- a/src/nvim/mapping.c
+++ b/src/nvim/mapping.c
@@ -1615,8 +1615,7 @@ char *eval_map_expr(mapblock_T *mp, int c)
// Forbid changing text or using ":normal" to avoid most of the bad side
// effects. Also restore the cursor position.
- textlock++;
- ex_normal_lock++;
+ expr_map_lock++;
set_vim_var_char(c); // set v:char to the typed character
const pos_T save_cursor = curwin->w_cursor;
const int save_msg_col = msg_col;
@@ -1637,8 +1636,7 @@ char *eval_map_expr(mapblock_T *mp, int c)
p = eval_to_string(expr, NULL, false);
xfree(expr);
}
- textlock--;
- ex_normal_lock--;
+ expr_map_lock--;
curwin->w_cursor = save_cursor;
msg_col = save_msg_col;
msg_row = save_msg_row;