Wire up a bunch of callbacks

This commit is contained in:
Kovid Goyal
2022-11-14 15:41:49 +05:30
parent e18b6638bb
commit 526a331f47
3 changed files with 91 additions and 19 deletions
+2 -1
View File
@@ -118,11 +118,12 @@ func do_io(device IOAbstraction, input utils.Reader, no_response bool, response_
response_received := false
cmd_prefix := []byte("@kitty-cmd")
handle_dcs := func(b []byte) {
handle_dcs := func(b []byte) error {
if bytes.HasPrefix(b, cmd_prefix) {
response_received = true
}
serialized_response = b[len(cmd_prefix):]
return nil
}
var p utils.EscapeCodeParser = utils.EscapeCodeParser{HandleDCS: handle_dcs}