From e8405f40fe2eb3675f1cb4f69e825eff5f13f269 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 7 May 2024 01:06:42 +0900 Subject: Refactor the code so that fzf can be used as a library (#3769) --- src/tui/light_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tui/light_windows.go') diff --git a/src/tui/light_windows.go b/src/tui/light_windows.go index 62b10c12..635b8926 100644 --- a/src/tui/light_windows.go +++ b/src/tui/light_windows.go @@ -72,7 +72,7 @@ func (r *LightRenderer) initPlatform() error { go func() { fd := int(r.inHandle) b := make([]byte, 1) - for { + for !r.closed.Get() { // HACK: if run from PSReadline, something resets ConsoleMode to remove ENABLE_VIRTUAL_TERMINAL_INPUT. _ = windows.SetConsoleMode(windows.Handle(r.inHandle), consoleFlagsInput) @@ -91,9 +91,9 @@ func (r *LightRenderer) closePlatform() { windows.SetConsoleMode(windows.Handle(r.inHandle), r.origStateInput) } -func openTtyIn() *os.File { +func openTtyIn() (*os.File, error) { // not used - return nil + return nil, nil } func (r *LightRenderer) setupTerminal() error { -- cgit v1.2.3