@@ -27,6 +27,10 @@ type clearScreenMsg struct{}
2727// enter the alternate screen buffer (i.e. the full terminal window). The
2828// altscreen will be automatically exited when the program quits. To manually
2929// exit the altscreen while the program is running, use [ExitAltScreen].
30+ //
31+ // Because commands run asynchronously, this command should not be used in your
32+ // model's Init function. To initialize your program with the altscreen enabled
33+ // use the WithAltScreen ProgramOption instead.
3034func EnterAltScreen () Msg {
3135 return enterAltScreenMsg {}
3236}
@@ -54,6 +58,10 @@ type exitAltScreenMsg struct{}
5458// EnableMouseCellMotion is a special command that enables mouse click,
5559// release, and wheel events. Mouse movement events are also captured if
5660// a mouse button is pressed (i.e., drag events).
61+ //
62+ // Because commands run asynchronously, this command should not be used in your
63+ // model's Init function. Use the [WithMouseCellMotion] [ProgramOption]
64+ // instead.
5765func EnableMouseCellMotion () Msg {
5866 return enableMouseCellMotionMsg {}
5967}
@@ -69,6 +77,9 @@ type enableMouseCellMotionMsg struct{}
6977//
7078// Many modern terminals support this, but not all. If in doubt, use
7179// [EnableMouseCellMotion] instead.
80+ //
81+ // Because commands run asynchronously, this command should not be used in your
82+ // model's Init function. Use the WithMouseAllMotion ProgramOption instead.
7283func EnableMouseAllMotion () Msg {
7384 return enableMouseAllMotionMsg {}
7485}
0 commit comments