Skip to content

Commit f9d90a3

Browse files
authored
fix: don't enter altscreen on empty input (#27)
* fix: don't enter altscreen on empty input * fix: exit(1)
1 parent ef1bbf9 commit f9d90a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ func main() {
380380
}
381381

382382
input := ansi.Strip(b.String())
383+
if strings.TrimSpace(input) == "" {
384+
fmt.Println("No input provided, exiting")
385+
os.Exit(1)
386+
}
383387
p := tea.NewProgram(newModel(input), tea.WithMouseAllMotion())
384388

385389
if _, err := p.Run(); err != nil {

0 commit comments

Comments
 (0)