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:
parent
7379488cee
commit
85f3372a32
@ -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
|
||||
|
@ -1,3 +1,3 @@
|
||||
println('Hello, world! | Привет, мир! | 你好世界')
|
||||
println('Hello, world! | Привет, мир! | 你好世界 | こんにちは、世界。')
|
||||
===output===
|
||||
Hello, world! | Привет, мир! | 你好世界
|
||||
Hello, world! | Привет, мир! | 你好世界 | こんにちは、世界。
|
||||
|
Loading…
Reference in New Issue
Block a user