aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongdong Zhou <dzhou121@gmail.com>2017-06-26 11:19:40 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2017-10-26 09:35:13 +0200
commit461ae698242458bffbf5fb68de89fe8b2a3defd2 (patch)
tree7f6172159e428b28d63c820fa9a3c0272393b884 /src
parent866dadaf753ba3733feb8c22d7da47af757bd35c (diff)
downloadrneovim-461ae698242458bffbf5fb68de89fe8b2a3defd2.tar.gz
rneovim-461ae698242458bffbf5fb68de89fe8b2a3defd2.tar.bz2
rneovim-461ae698242458bffbf5fb68de89fe8b2a3defd2.zip
ext_cmdline: Add function block support
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/ui_events.in.h4
-rw-r--r--src/nvim/eval.c11
2 files changed, 14 insertions, 1 deletions
diff --git a/src/nvim/api/ui_events.in.h b/src/nvim/api/ui_events.in.h
index 17eefbe1d6..5602dc6df3 100644
--- a/src/nvim/api/ui_events.in.h
+++ b/src/nvim/api/ui_events.in.h
@@ -75,5 +75,9 @@ void cmdline_char(String c, Integer shift, Integer level)
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
void cmdline_hide(Integer level)
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
+void cmdline_function_show(void)
+ FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
+void cmdline_function_hide(void)
+ FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
#endif // NVIM_API_UI_EVENTS_IN_H
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 3c9614dfcd..d5ff01e922 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -19816,6 +19816,10 @@ void ex_function(exarg_T *eap)
goto errret_2;
}
+ if (ui_is_external(kUICmdline)) {
+ ui_call_cmdline_function_show();
+ }
+
// find extra arguments "range", "dict", "abort" and "closure"
for (;; ) {
p = skipwhite(p);
@@ -19868,7 +19872,9 @@ void ex_function(exarg_T *eap)
if (!eap->skip && did_emsg)
goto erret;
- msg_putchar('\n'); /* don't overwrite the function name */
+ if (!ui_is_external(kUICmdline)) {
+ msg_putchar('\n'); /* don't overwrite the function name */
+ }
cmdline_row = msg_row;
}
@@ -20194,6 +20200,9 @@ ret_free:
xfree(name);
did_emsg |= saved_did_emsg;
need_wait_return |= saved_wait_return;
+ if (ui_is_external(kUICmdline)) {
+ ui_call_cmdline_function_hide();
+ }
}
/// Get a function name, translating "<SID>" and "<SNR>".