summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-11-25 14:05:37 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-11-25 14:05:37 +0900
commit6f17f412bad6447520dd3487aa5235887cb1fd19 (patch)
treea6aff690cfca90302514910c468b8ded1df66bee /src
parent746961bf43bb49a1d0857dead54666f9779b4286 (diff)
downloadfzf-6f17f412bad6447520dd3487aa5235887cb1fd19.tar.gz
Workaround for rendering glitch in case of short-lived input process
: | fzf --preview 'echo foo'
Diffstat (limited to 'src')
-rw-r--r--src/tui/ncurses.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tui/ncurses.go b/src/tui/ncurses.go
index dd2bc90a..051a042c 100644
--- a/src/tui/ncurses.go
+++ b/src/tui/ncurses.go
@@ -130,6 +130,13 @@ func Init(theme *ColorTheme, black bool, mouse bool) {
} else {
_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) {