mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
ext_cmdline: Added cmdline prompt
This commit is contained in:

committed by
Björn Linse

parent
439c39a2cf
commit
6e90bc7200
@@ -3114,11 +3114,17 @@ static void redrawcmdprompt(void)
|
||||
}
|
||||
}
|
||||
if (ccline.cmdprompt != NULL) {
|
||||
msg_puts_attr((const char *)ccline.cmdprompt, ccline.cmdattr);
|
||||
ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns;
|
||||
/* do the reverse of set_cmdspos() */
|
||||
if (ccline.cmdfirstc != NUL)
|
||||
--ccline.cmdindent;
|
||||
if (cmdline_external) {
|
||||
Array args = ARRAY_DICT_INIT;
|
||||
ADD(args, STRING_OBJ(cstr_to_string((char *)(ccline.cmdprompt))));
|
||||
ui_event("cmdline_prompt", args);
|
||||
} else {
|
||||
msg_puts_attr((const char *)ccline.cmdprompt, ccline.cmdattr);
|
||||
ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns;
|
||||
/* do the reverse of set_cmdspos() */
|
||||
if (ccline.cmdfirstc != NUL)
|
||||
--ccline.cmdindent;
|
||||
}
|
||||
} else
|
||||
for (i = ccline.cmdindent; i > 0; --i)
|
||||
msg_putchar(' ');
|
||||
@@ -6036,3 +6042,8 @@ void cmdline_set_external(bool external)
|
||||
{
|
||||
cmdline_external = external;
|
||||
}
|
||||
|
||||
bool cmdline_get_external(void)
|
||||
{
|
||||
return cmdline_external;
|
||||
}
|
||||
|
Reference in New Issue
Block a user