ext_cmdline: change the content format

This commit is contained in:
Dongdong Zhou
2017-04-28 07:49:45 +01:00
committed by Björn Linse
parent 550651c130
commit daec81ab51
3 changed files with 13 additions and 6 deletions

View File

@@ -2731,7 +2731,12 @@ void ui_ext_cmdline_char(int c, int shift)
void ui_ext_cmdline_show(void)
{
Array args = ARRAY_DICT_INIT;
ADD(args, STRING_OBJ(cstr_to_string((char *)(ccline.cmdbuff))));
Array content = ARRAY_DICT_INIT;
Array text = ARRAY_DICT_INIT;
ADD(text, STRING_OBJ(cstr_to_string("Normal")));
ADD(text, STRING_OBJ(cstr_to_string((char *)(ccline.cmdbuff))));
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))));