shell: fix history feature

When user was typing a new command and next pressed an up arrow
shell has displayed previously executed command. Next it was not
possible to display back currently edited command using a down arrow.

Fixes #10766.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-10-23 19:17:28 +02:00 committed by Carles Cufí
commit 4c420ff3bf
3 changed files with 35 additions and 15 deletions

View file

@ -288,6 +288,7 @@ struct shell_flags {
u32_t processing :1; /*!< Shell is executing process function.*/
u32_t tx_rdy :1;
u32_t mode_delete :1; /*!< Operation mode of backspace key */
u32_t history_exit:1; /*!< Request to exit history mode */
};
BUILD_ASSERT_MSG((sizeof(struct shell_flags) == sizeof(u32_t)),