2 Commits

Author SHA1 Message Date
42aec53edb fix history 2024-07-19 23:49:15 +02:00
8f71535dfd minor fixes 2024-07-19 22:32:56 +02:00
3 changed files with 11 additions and 5 deletions

View File

@@ -128,7 +128,11 @@ void historyPrevius(CLI_t* cli)
// write line
if ((ret >= 0) && (line != NULL))
{
CLI_stringOut(cli, line);
int i;
for (i=0; *(line + i) != '\0'; i++)
{
CLI_charIn(cli, *(line + i));
}
}
}
void historyNext(CLI_t* cli)
@@ -148,7 +152,10 @@ void historyNext(CLI_t* cli)
if ((ret >= 0) && (line != NULL))
{
int i;
CLI_stringOut(cli, line);
for (i=0; *(line + i) != '\0'; i++)
{
CLI_charIn(cli, *(line + i));
}
}
}
#endif

View File

@@ -4,7 +4,6 @@
#include <stdbool.h>
#include <config.h>
#define HISTORY
#include "../CMDList/CMDList.h"
#include "../FIFOBuff/FIFOBuffChar.h"

View File

@@ -123,7 +123,7 @@ int History_getPrev(History_t* history, char** line)
*line = NULL;
retCode = -1;
}
return 0;
return retCode;
}
int History_getNext(History_t* history, char** line)
@@ -144,7 +144,7 @@ int History_getNext(History_t* history, char** line)
*line = NULL;
retCode = -1;
}
return 0;
return retCode;
}
int History_getFullHistory(History_t* history, char*** list)