micro-optimization

This commit is contained in:
Kovid Goyal 2023-01-18 09:58:29 +05:30
parent 0c7b4df6fc
commit 5edb1e2d6b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -15,6 +15,7 @@ import (
"golang.org/x/sys/unix"
"kitty/tools/tty"
"kitty/tools/utils"
)
var SIGNULL unix.Signal
@ -110,7 +111,7 @@ func (self *Loop) handle_osc(raw []byte) error {
}
func (self *Loop) handle_dcs(raw []byte) error {
if self.OnRCResponse != nil && bytes.HasPrefix(raw, []byte("@kitty-cmd")) {
if self.OnRCResponse != nil && bytes.HasPrefix(raw, utils.UnsafeStringToBytes("@kitty-cmd")) {
return self.OnRCResponse(raw[len("@kitty-cmd"):])
}
if self.OnEscapeCode != nil {