ext_cmdline: Added cmdline prompt

This commit is contained in:
Dongdong Zhou
2017-02-23 09:53:12 +00:00
committed by Björn Linse
parent 439c39a2cf
commit 6e90bc7200
3 changed files with 30 additions and 12 deletions

View File

@@ -11149,15 +11149,19 @@ void get_user_input(const typval_T *const argvars,
// Only the part of the message after the last NL is considered as
// prompt for the command line.
const char *p = strrchr(prompt, '\n');
if (p == NULL) {
if (ui_is_external(kUICmdline)) {
p = prompt;
} else {
p++;
msg_start();
msg_clr_eos();
msg_puts_attr_len(prompt, p - prompt, echo_attr);
msg_didout = false;
msg_starthere();
if (p == NULL) {
p = prompt;
} else {
p++;
msg_start();
msg_clr_eos();
msg_puts_attr_len(prompt, p - prompt, echo_attr);
msg_didout = false;
msg_starthere();
}
}
cmdline_row = msg_row;