summaryrefslogtreecommitdiff
path: root/components/finsh/shell.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2014-07-19 06:46:39 +0800
committerBernard Xiong <[email protected]>2014-07-19 06:46:39 +0800
commit350b1080eafb565875f82bfe5da9173fa7f0f149 (patch)
treea044f04e1d200c2421a74e840ab6da143c431b55 /components/finsh/shell.c
parent61712bbd13b7c820307f0570d49f1bc0fc6b857a (diff)
parent50e7ae7e875c28cdc65baf9c0ec7893a59211a23 (diff)
Merge pull request #303 from BernardXiong/stable-v1.2.xv1.2.2
Merge 2.0.0 modification to prepare v1.2.2 release.
Diffstat (limited to 'components/finsh/shell.c')
-rw-r--r--components/finsh/shell.c6
1 files changed, 6 insertions, 0 deletions
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 */
}
}