summaryrefslogtreecommitdiff
path: root/src/tui/tui.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-07 01:06:42 +0900
committerGitHub <noreply@github.com>2024-05-07 01:06:42 +0900
commite8405f40fe2eb3675f1cb4f69e825eff5f13f269 (patch)
treec917367f1f0098939f9cdf7376a2a135907024fc /src/tui/tui.go
parent065b9e6fb2ce3e6e50ff423c3786989afa04ee14 (diff)
downloadfzf-e8405f40fe2eb3675f1cb4f69e825eff5f13f269.tar.gz
Refactor the code so that fzf can be used as a library (#3769)
Diffstat (limited to 'src/tui/tui.go')
-rw-r--r--src/tui/tui.go10
1 files changed, 2 insertions, 8 deletions
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,