From 3dff6d4b58c1251befa592665eb026c7cf2aa6f8 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 3 May 2021 14:28:45 -0400 Subject: [PATCH] Deprecate Program.EnterAltScreen Program.ExitAltScreen methods The EnterAltScreen/ExitAltScreen commands should be used instead. --- tea.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tea.go b/tea.go index 1c51bd1..59a595f 100644 --- a/tea.go +++ b/tea.go @@ -168,14 +168,15 @@ func Quit() Msg { // send a quitMsg with Quit. type quitMsg struct{} -// EnterAltScreen is a special command that tells the Bubble Tea program to enter -// alternate screen buffer. +// EnterAltScreen is a special command that tells the Bubble Tea program to +// enter alternate screen buffer. func EnterAltScreen() Msg { return enterAltScreenMsg{} } -// enterAltScreenMsg in an internal message signals that the program should enter -// alternate screen buffer. You can send a enterAltScreenMsg with EnterAltScreen. +// enterAltScreenMsg in an internal message signals that the program should +// enter alternate screen buffer. You can send a enterAltScreenMsg with +// EnterAltScreen. type enterAltScreenMsg struct{} // ExitAltScreen is a special command that tells the Bubble Tea program to exit @@ -472,6 +473,8 @@ func (p *Program) Start() error { // EnterAltScreen enters the alternate screen buffer, which consumes the entire // terminal window. ExitAltScreen will return the terminal to its former state. +// +// Deprecated. Use the EnterAltScreen() command instead. func (p *Program) EnterAltScreen() { p.mtx.Lock() defer p.mtx.Unlock() @@ -490,6 +493,8 @@ func (p *Program) EnterAltScreen() { } // ExitAltScreen exits the alternate screen buffer. +// +// Deprecated. Use the ExitAltScreen() command instead. func (p *Program) ExitAltScreen() { p.mtx.Lock() defer p.mtx.Unlock()