mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl: readline line editing
This commit is contained in:

committed by
Alexander Medvednikov

parent
0e0f0ae5ea
commit
1956c6f906
@ -27,8 +27,11 @@ pub fn (r mut Readline) read_line_utf8(prompt string) ?ustring {
|
||||
}
|
||||
|
||||
print(r.prompt)
|
||||
r.current = os.get_line().ustring()
|
||||
line := os.get_raw_line()
|
||||
|
||||
if line.len >= 0 {
|
||||
r.current = line.ustring()
|
||||
}
|
||||
r.previous_lines[0] = ''.ustring()
|
||||
r.search_index = 0
|
||||
if r.current.s == '' {
|
||||
|
Reference in New Issue
Block a user