mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
vrepl: fix slow response for empty line input (after just pressing 'enter/return') (fix #23856) (#23858)
This commit is contained in:
parent
cec123a0df
commit
698018cd3f
@ -423,16 +423,13 @@ fn run_repl(workdir string, vrepl_prefix string) int {
|
||||
}
|
||||
oline := r.get_one_line(prompt) or { break }
|
||||
line := oline.trim_space()
|
||||
if line == '' && oline.ends_with('\n') {
|
||||
if line == '' {
|
||||
continue
|
||||
}
|
||||
if line.len <= -1 || line == 'exit' {
|
||||
break
|
||||
}
|
||||
r.line = line
|
||||
if r.line == '\n' {
|
||||
continue
|
||||
}
|
||||
if r.line == 'clear' {
|
||||
term.erase_clear()
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user