fix ansi --osc parameter adding extra semi-colon (#7113)

This commit is contained in:
Darren Schroeder 2022-11-12 16:27:58 -06:00 committed by GitHub
parent 649c8319e6
commit 35f9299fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,8 +381,10 @@ Format: #
format!("\x1b[{}", code_string)
} else if osc && param_is_valid_string {
// Operating system command aka osc ESC ] <- note the right brace, not left brace for osc
// OCS's need to end with a bell '\x07' char
format!("\x1b]{};", code_string)
// OCS's need to end with either:
// bel '\x07' char
// string terminator aka st '\\' char
format!("\x1b]{}", code_string)
} else if param_is_valid_string {
// parse hex colors like #00FF00
if code_string.starts_with('#') {