Make using alternate screen the default

This commit is contained in:
Kovid Goyal 2022-08-24 22:18:46 +05:30
parent 235eb868b2
commit d2a15a2009
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -144,6 +144,7 @@ func (self *Loop) on_SIGHUP() error {
func CreateLoop() (*Loop, error) {
l := Loop{controlling_term: nil}
l.terminal_options.alternate_screen = true
l.escape_code_parser.HandleCSI = l.handle_csi
l.escape_code_parser.HandleOSC = l.handle_osc
l.escape_code_parser.HandleDCS = l.handle_dcs
@ -154,8 +155,8 @@ func CreateLoop() (*Loop, error) {
return &l, nil
}
func (self *Loop) UseAlternateScreen() {
self.terminal_options.alternate_screen = true
func (self *Loop) NoAlternateScreen() {
self.terminal_options.alternate_screen = false
}
func (self *Loop) MouseTracking(mt MouseTracking) {

View File

@ -19,6 +19,7 @@ var Canceled = errors.New("Canceled by user")
func ReadPassword(prompt string, kill_if_signaled bool) (password string, err error) {
loop, err := CreateLoop()
loop.NoAlternateScreen()
shadow := ""
if err != nil {
return