diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-07 01:06:42 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-07 01:06:42 +0900 |
| commit | e8405f40fe2eb3675f1cb4f69e825eff5f13f269 (patch) | |
| tree | c917367f1f0098939f9cdf7376a2a135907024fc /src/tui/light_windows.go | |
| parent | 065b9e6fb2ce3e6e50ff423c3786989afa04ee14 (diff) | |
| download | fzf-e8405f40fe2eb3675f1cb4f69e825eff5f13f269.tar.gz | |
Refactor the code so that fzf can be used as a library (#3769)
Diffstat (limited to 'src/tui/light_windows.go')
| -rw-r--r-- | src/tui/light_windows.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |
