Workaround for rendering glitch in case of short-lived input process

: | fzf --preview 'echo foo'
This commit is contained in:
Junegunn Choi 2016-11-25 14:05:37 +09:00
parent 746961bf43
commit 6f17f412ba
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -130,6 +130,13 @@ func Init(theme *ColorTheme, black bool, mouse bool) {
} else { } else {
_colorFn = attrMono _colorFn = attrMono
} }
C.nodelay(C.stdscr, true)
ch := C.getch()
if ch != C.ERR {
C.ungetch(ch)
}
C.nodelay(C.stdscr, false)
} }
func initPairs(theme *ColorTheme) { func initPairs(theme *ColorTheme) {