mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Create new line while pressing enter in repl.
Pressing Enter in repl should create new line instead of quiting the repl.
This commit is contained in:

committed by
Alexander Medvednikov

parent
4aab26d3e3
commit
65fed2d784
@ -858,7 +858,11 @@ fn run_repl() []string {
|
||||
mut lines := []string
|
||||
for {
|
||||
print('>>> ')
|
||||
mut line := os.get_line().trim_space()
|
||||
mut line := os.get_raw_line()
|
||||
if line.trim_space() == '' && line.ends_with('\n') {
|
||||
continue
|
||||
}
|
||||
line = line.trim_space()
|
||||
if line == '' {
|
||||
break
|
||||
}
|
||||
|
Reference in New Issue
Block a user