Skip to content

Commit

Permalink
docs(focus): add some GoDoc links and add note on focus support
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Aug 30, 2024
1 parent e58efab commit d5f1b71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,13 @@ func WithFPS(fps int) ProgramOption {
}
}

// WithReportFocus enables reporting when the terminal gains and lost focus.
// WithReportFocus enables reporting when the terminal gains and loses
// focus. When this is enabled [FocusMsg] and [BlurMsg] messages will be sent
// to your Update method.
//
// You can then check for FocusMsg and BlurMsg in your model's Update method.
// Note that while most terminals and multiplexers support focus reporting,
// some do not. Also note that tmux needs to be configured to report focus
// events.
func WithReportFocus() ProgramOption {
return func(p *Program) {
p.startupOptions |= withReportFocus
Expand Down

0 comments on commit d5f1b71

Please sign in to comment.