mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
readline: fix bug that full-width spaces are treated as eof (#12763)
This commit is contained in:
@@ -200,6 +200,9 @@ pub fn read_line(prompt string) ?string {
|
||||
|
||||
// analyse returns an `Action` based on the type of input byte given in `c`.
|
||||
fn (r Readline) analyse(c int) Action {
|
||||
if c > 255 {
|
||||
return Action.insert_character
|
||||
}
|
||||
match byte(c) {
|
||||
`\0`, 0x3, 0x4, 255 {
|
||||
return .eof
|
||||
|
||||
Reference in New Issue
Block a user