mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
ext_cmdline: fix firstc, change cmdline_leave to cmdline_hide
This commit is contained in:

committed by
Björn Linse

parent
daec81ab51
commit
e164ba41c8
@@ -1837,7 +1837,7 @@ getcmdline (
|
||||
char_u *p = command_line_enter(firstc, count, indent);
|
||||
if (ui_is_external(kUICmdline)) {
|
||||
Array args = ARRAY_DICT_INIT;
|
||||
ui_event("cmdline_leave", args);
|
||||
ui_event("cmdline_hide", args);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
@@ -2738,16 +2738,13 @@ void ui_ext_cmdline_show(void)
|
||||
ADD(content, ARRAY_OBJ(text));
|
||||
ADD(args, ARRAY_OBJ(content));
|
||||
ADD(args, INTEGER_OBJ(ccline.cmdpos));
|
||||
if (ccline.cmdfirstc != NUL) {
|
||||
ADD(args, STRING_OBJ(cstr_to_string((char *)(&ccline.cmdfirstc))));
|
||||
} else {
|
||||
ADD(args, STRING_OBJ(cstr_to_string("")));
|
||||
}
|
||||
if (ccline.cmdprompt != NULL) {
|
||||
ADD(args, STRING_OBJ(cstr_to_string((char *)(ccline.cmdprompt))));
|
||||
} else {
|
||||
ADD(args, STRING_OBJ(cstr_to_string("")));
|
||||
}
|
||||
char *firstc = (char []) { (char)ccline.cmdfirstc };
|
||||
String str = (String) {
|
||||
.data = xmemdupz(firstc, 1),
|
||||
.size = 1
|
||||
};
|
||||
ADD(args, STRING_OBJ(str));
|
||||
ADD(args, STRING_OBJ(cstr_to_string((char *)(ccline.cmdprompt))));
|
||||
ui_event("cmdline_show", args);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user