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

repl: fix exiting raw mode by reverting da9b3d8

This reverts commit da9b3d82d2.
This commit is contained in:
Delyan Angelov 2020-05-29 09:03:55 +03:00
parent 1c11ac9fdf
commit 0970e61350

View File

@ -48,13 +48,13 @@ pub fn (mut r Readline) enable_raw_mode() {
r.is_raw = false r.is_raw = false
return return
} }
mut raw := &r.orig_termios mut raw := r.orig_termios
raw.c_iflag &= ~( C.BRKINT | C.ICRNL | C.INPCK | C.ISTRIP | C.IXON ) raw.c_iflag &= ~( C.BRKINT | C.ICRNL | C.INPCK | C.ISTRIP | C.IXON )
raw.c_cflag |= ( C.CS8 ) raw.c_cflag |= ( C.CS8 )
raw.c_lflag &= ~( C.ECHO | C.ICANON | C.IEXTEN | C.ISIG ) raw.c_lflag &= ~( C.ECHO | C.ICANON | C.IEXTEN | C.ISIG )
raw.c_cc[C.VMIN] = 1 raw.c_cc[C.VMIN] = 1
raw.c_cc[C.VTIME] = 0 raw.c_cc[C.VTIME] = 0
C.tcsetattr(0, C.TCSADRAIN, raw) C.tcsetattr(0, C.TCSADRAIN, &raw)
r.is_raw = true r.is_raw = true
r.is_tty = true r.is_tty = true
} }