aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-05 14:10:32 -0700
committerJustin M. Keyes <justinkz@gmail.com>2019-09-05 14:10:32 -0700
commit8b06231612cd608b2dce5e0a09bf40192a4803cb (patch)
tree04fbfef7b326574e296b2fe1a772829ac0af8be4 /src/nvim/getchar.c
parent096212d52c6375c19c046d86a7178bae91e287fc (diff)
parentd3f1eb3024fa297c970a79dd24ef818e4aeb8525 (diff)
downloadrneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.gz
rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.bz2
rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.zip
Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}'
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 0ef0c852a4..318b36860e 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2957,7 +2957,8 @@ int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev,
mp->m_silent = args->silent;
mp->m_mode = mode;
mp->m_expr = args->expr;
- mp->m_script_ID = current_SID;
+ mp->m_script_ctx = current_sctx;
+ mp->m_script_ctx.sc_lnum += sourcing_lnum;
did_it = true;
}
}
@@ -3032,7 +3033,8 @@ int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev,
mp->m_silent = args->silent;
mp->m_mode = mode;
mp->m_expr = args->expr;
- mp->m_script_ID = current_SID;
+ mp->m_script_ctx = current_sctx;
+ mp->m_script_ctx.sc_lnum += sourcing_lnum;
// add the new entry in front of the abbrlist or maphash[] list
if (is_abbrev) {
@@ -3375,9 +3377,10 @@ showmap (
msg_outtrans_special(s, FALSE);
xfree(s);
}
- if (p_verbose > 0)
- last_set_msg(mp->m_script_ID);
- ui_flush(); /* show one line at a time */
+ if (p_verbose > 0) {
+ last_set_msg(mp->m_script_ctx);
+ }
+ ui_flush(); // show one line at a time
}
/// Check if a map exists that has given string in the rhs