Skip to content

Commit

Permalink
Run in full screen (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
atye authored Jul 13, 2021
1 parent b0a1f0a commit 6bb4e6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ ttchat --channel ludwig --lines 5
// Create IRC client and start
ircClient := client.NewGempirClient(conf.Username, channel, accessToken)
c := irc.NewIRCService(displayName, channel, ircClient)
if tea.NewProgram(terminal.NewModel(lines, c)).Start() != nil {
if tea.NewProgram(terminal.NewModel(lines, c), tea.WithAltScreen()).Start() != nil {
errExit(err)
}
},
Expand Down
1 change: 1 addition & 0 deletions internal/terminal/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}

case tea.WindowSizeMsg:
m.ti.Width = msg.Width
return m, listenForMessages(m.in)

case types.Message:
Expand Down

0 comments on commit 6bb4e6c

Please sign in to comment.