1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: fix exiting the v repl, after just Enter (regression happened in bf00ac6)

This commit is contained in:
Delyan Angelov 2023-08-02 10:57:28 +03:00
parent 1d9835f0e4
commit 8ee1667a9a
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 7 additions and 1 deletions

View File

@ -312,7 +312,7 @@ fn run_repl(workdir string, vrepl_prefix string) int {
if line == '' && oline.ends_with('\n') { if line == '' && oline.ends_with('\n') {
continue continue
} }
if line.len <= -1 || line == '' || line == 'exit' { if line.len <= -1 || line == 'exit' {
break break
} }
if exit_pos := line.index('exit') { if exit_pos := line.index('exit') {

View File

@ -0,0 +1,6 @@
println('hi')
===output===
hi