Make using alternate screen the default
This commit is contained in:
parent
235eb868b2
commit
d2a15a2009
@ -144,6 +144,7 @@ func (self *Loop) on_SIGHUP() error {
|
|||||||
|
|
||||||
func CreateLoop() (*Loop, error) {
|
func CreateLoop() (*Loop, error) {
|
||||||
l := Loop{controlling_term: nil}
|
l := Loop{controlling_term: nil}
|
||||||
|
l.terminal_options.alternate_screen = true
|
||||||
l.escape_code_parser.HandleCSI = l.handle_csi
|
l.escape_code_parser.HandleCSI = l.handle_csi
|
||||||
l.escape_code_parser.HandleOSC = l.handle_osc
|
l.escape_code_parser.HandleOSC = l.handle_osc
|
||||||
l.escape_code_parser.HandleDCS = l.handle_dcs
|
l.escape_code_parser.HandleDCS = l.handle_dcs
|
||||||
@ -154,8 +155,8 @@ func CreateLoop() (*Loop, error) {
|
|||||||
return &l, nil
|
return &l, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *Loop) UseAlternateScreen() {
|
func (self *Loop) NoAlternateScreen() {
|
||||||
self.terminal_options.alternate_screen = true
|
self.terminal_options.alternate_screen = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *Loop) MouseTracking(mt MouseTracking) {
|
func (self *Loop) MouseTracking(mt MouseTracking) {
|
||||||
|
|||||||
@ -19,6 +19,7 @@ var Canceled = errors.New("Canceled by user")
|
|||||||
|
|
||||||
func ReadPassword(prompt string, kill_if_signaled bool) (password string, err error) {
|
func ReadPassword(prompt string, kill_if_signaled bool) (password string, err error) {
|
||||||
loop, err := CreateLoop()
|
loop, err := CreateLoop()
|
||||||
|
loop.NoAlternateScreen()
|
||||||
shadow := ""
|
shadow := ""
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user