Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
69f3a6f1
Commit
69f3a6f1
authored
Nov 18, 2015
by
devsaurus
Browse files
skip CR in interactive mode
parent
99cc9e12
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/lua/lua.c
View file @
69f3a6f1
...
@@ -549,12 +549,10 @@ static bool readline(lua_Load *load){
...
@@ -549,12 +549,10 @@ static bool readline(lua_Load *load){
{
{
if
(
run_input
)
if
(
run_input
)
{
{
/*
handle
CR key */
/*
skip
CR key */
if
(
ch
==
'\r'
)
if
(
ch
==
'\r'
)
{
{
char
next
;
continue
;
if
(
uart_getc
(
&
next
))
ch
=
next
;
}
}
/* backspace key */
/* backspace key */
else
if
(
ch
==
0x7f
||
ch
==
0x08
)
else
if
(
ch
==
0x7f
||
ch
==
0x08
)
...
@@ -580,7 +578,7 @@ static bool readline(lua_Load *load){
...
@@ -580,7 +578,7 @@ static bool readline(lua_Load *load){
// }
// }
/* end of line */
/* end of line */
if
(
ch
==
'\r'
||
ch
==
'\n'
)
if
(
ch
==
'\n'
)
{
{
load
->
line
[
load
->
line_position
]
=
0
;
load
->
line
[
load
->
line_position
]
=
0
;
if
(
uart0_echo
)
uart_putc
(
'\n'
);
if
(
uart0_echo
)
uart_putc
(
'\n'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment