shell: fix tab key functionality.

Fixing commit:#7ad59c84c84e8b7ea3c0438ff01c8a6343e65812

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-12-18 10:00:01 +01:00 committed by Carles Cufí
parent 9fe81e9165
commit cab9fa35ad

View file

@ -445,7 +445,7 @@ static void tab_options_print(const struct shell *shell,
/* Printing all matching commands (options). */
tab_item_print(shell, SHELL_INIT_OPTION_PRINTER, longest);
while (cnt--) {
while (cnt) {
/* shell->ctx->active_cmd can be safely used outside of command
* context to save stack
*/
@ -459,6 +459,7 @@ static void tab_options_print(const struct shell *shell,
}
tab_item_print(shell, match->syntax, longest);
cnt--;
}
cursor_next_line_move(shell);