Fix some bugs
This commit is contained in:
parent
8e5ab94a6d
commit
86eb0b82ab
14
src/xcmd.c
14
src/xcmd.c
|
@ -303,15 +303,11 @@ char* xcmd_display_get(void)
|
||||||
void xcmd_display_clear(void)
|
void xcmd_display_clear(void)
|
||||||
{
|
{
|
||||||
char *line = xcmd_display_get();
|
char *line = xcmd_display_get();
|
||||||
uint16_t len = strlen(line);
|
xcmd_print(DL(0));
|
||||||
if(len)
|
xcmd_print("\r%s", g_xcmder.parser.prompt);
|
||||||
{
|
g_xcmder.parser.byte_num = 0;
|
||||||
xcmd_print(DL(0));
|
g_xcmder.parser.cursor = 0;
|
||||||
xcmd_print("\r%s", g_xcmder.parser.prompt);
|
line[0] = '\0';
|
||||||
g_xcmder.parser.byte_num = 0;
|
|
||||||
g_xcmder.parser.cursor = 0;
|
|
||||||
line[0] = '\0';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void xcmd_display_insert_char(char c)
|
void xcmd_display_insert_char(char c)
|
||||||
|
|
Loading…
Reference in New Issue