1
0
mirror of https://github.com/gizak/termui.git synced 2025-04-30 13:49:00 +08:00
termui/widgets/exp/multiplexer.go
2019-04-20 15:21:53 +02:00

29 lines
506 B
Go

// <Copyright> 2019 Simon Robin Lehn. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
package exp
import (
"strings"
)
func wrap(s string) string {
if !isMuxed {
return s
}
if isTmux {
return tmuxWrap(s)
}
return s
}
func tmuxWrap(s string) string {
return "\033Ptmux;" + strings.Replace(s, "\033", "\033\033", -1) + "\033\\"
}
/*
// https://savannah.gnu.org/bugs/index.php?56063
func screenWrap(s string) string {}
*/