Skip to content

Commit cfe6724

Browse files
committed
docs: update code example formatting in screen.go
1 parent befc5a4 commit cfe6724

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

screen.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,30 @@ type LayerHitMsg struct {
4242
//
4343
// Example:
4444
//
45-
// ```go
46-
// func (m model) Init() tea.Cmd {
47-
// // Does my terminal support reporting focus events?
48-
// return tea.Raw(ansi.RequestModeFocusEvent)
49-
// }
45+
// ```go
46+
// func (m model) Init() tea.Cmd {
47+
// // Does my terminal support reporting focus events?
48+
// return tea.Raw(ansi.RequestModeFocusEvent)
49+
// }
5050
//
51-
// func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
52-
// switch msg := msg.(type) {
53-
// case tea.ModeReportMsg:
54-
// if msg.Mode == ansi.ModeFocusEvent && !msg.Value.IsNotRecognized() {
55-
// // Terminal supports focus events
56-
// m.supportsFocus = true
57-
// }
58-
// }
59-
// return m, nil
60-
// }
51+
// func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
52+
// switch msg := msg.(type) {
53+
// case tea.ModeReportMsg:
54+
// if msg.Mode == ansi.ModeFocusEvent && !msg.Value.IsNotRecognized() {
55+
// // Terminal supports focus events
56+
// m.supportsFocus = true
57+
// }
58+
// }
59+
// return m, nil
60+
// }
6161
//
62-
// func (m model) View() tea.View {
63-
// var view tea.View
64-
// view.ReportFocus = m.supportsFocus
65-
// view.SetContent(fmt.Sprintf("Terminal supports focus events: %v", m.supportsFocus))
66-
// return view
67-
// }
68-
// ```
62+
// func (m model) View() tea.View {
63+
// var view tea.View
64+
// view.ReportFocus = m.supportsFocus
65+
// view.SetContent(fmt.Sprintf("Terminal supports focus events: %v", m.supportsFocus))
66+
// return view
67+
// }
68+
// ```
6969
//
7070
// See: https://vt100.net/docs/vt510-rm/DECRPM.html
7171
type ModeReportMsg struct {

0 commit comments

Comments
 (0)