diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/api/ui_events.in.h | 4 | ||||
-rw-r--r-- | src/nvim/eval.c | 11 |
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>". |