If you start 3mux with no arguments when a session is already running and then CTRL-C exit after the menu of available sessions is displayed an SGR attribute will be left enabled changing the font colour.
Here's a slightly rough screencast:
I think it's SGR 2 that is being left enabled and that the problem is here in main.go:
fmt.Print("\x1b[1;36m> " + options[0] + "\x1b[39;2m\r\n")
for _, option := range options[1:] {
fmt.Print(" " + option + "\x1b[39m\r\n")
}
fmt.Print("+ create new session\r")
fmt.Printf("\x1b[%dA", len(options))
clearOptions := func() {
The solution may be to add a fmt.Printf("\x1b[m") before the definition of clearOptions.
Note that if you enter a new session name the problem is not exhibited which looks to be because promptNewSessionName() resets SGR attributes in the second line here:
fmt.Print("\x1b[22mName of new session:\r\n")
fmt.Print("\x1b[22;36m? \x1b[m")
If you start 3mux with no arguments when a session is already running and then CTRL-C exit after the menu of available sessions is displayed an SGR attribute will be left enabled changing the font colour.
Here's a slightly rough screencast:
I think it's SGR 2 that is being left enabled and that the problem is here in main.go:
The solution may be to add a
fmt.Printf("\x1b[m")
before the definition of clearOptions.Note that if you enter a new session name the problem is not exhibited which looks to be because promptNewSessionName() resets SGR attributes in the second line here: