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/tui.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/tui/tui.go') diff --git a/src/tui/tui.go b/src/tui/tui.go index a56edc7f..e4858c66 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -1,8 +1,6 @@ package tui import ( - "fmt" - "os" "strconv" "time" @@ -104,6 +102,7 @@ const ( CtrlAlt Invalid + Fatal Mouse DoubleClick @@ -525,7 +524,7 @@ type TermSize struct { } type Renderer interface { - Init() + Init() error Resize(maxHeightFunc func(int) int) Pause(clear bool) Resume(clear bool, sigcont bool) @@ -685,11 +684,6 @@ func NoColorTheme() *ColorTheme { } } -func errorExit(message string) { - fmt.Fprintln(os.Stderr, message) - util.Exit(2) -} - func init() { Default16 = &ColorTheme{ Colored: true, -- cgit v1.2.3