From f44f6caadb13cfd88d0f45576214dc474dcedaf7 Mon Sep 17 00:00:00 2001 From: bernard Date: Thu, 10 Jul 2014 13:35:28 +0800 Subject: [PATCH] [Finsh] Fix command line size issue in finsh. --- components/finsh/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 393d68713c..ae099e7e7c 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -530,6 +530,12 @@ void finsh_thread_entry(void* parameter) ch = 0; shell->line_position ++; shell->line_curpos++; + if (shell->line_position >= 80) + { + /* clear command line */ + shell->line_position = 0; + shell->line_curpos = 0; + } } /* end of device read */ } } -- GitLab