diff options
Diffstat (limited to 'src/curses/curses.go')
-rw-r--r-- | src/curses/curses.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/curses/curses.go b/src/curses/curses.go index 51b68132..3de8e982 100644 --- a/src/curses/curses.go +++ b/src/curses/curses.go @@ -8,6 +8,7 @@ package curses import "C" import ( + "fmt" "os" "os/signal" "syscall" @@ -258,6 +259,10 @@ func Init(theme *ColorTheme, black bool, mouse bool) { C.setlocale(C.LC_ALL, C.CString("")) _screen = C.newterm(nil, C.stderr, C.stdin) + if _screen == nil { + fmt.Println("Invalid $TERM: " + os.Getenv("TERM")) + os.Exit(1) + } C.set_term(_screen) if mouse { C.mousemask(C.ALL_MOUSE_EVENTS, nil) |