mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
Switch to using goroutines rather than a select()
More complex code since now we have to synchronize between threads, but a good way to teach myself more about goroutines.
This commit is contained in:
@@ -70,9 +70,9 @@ func wrap_in_escape_code(data []byte) []byte {
|
||||
const prefix = "\x1bP@kitty-cmd"
|
||||
const suffix = "\x1b\\"
|
||||
ans := make([]byte, len(prefix)+len(data)+len(suffix))
|
||||
n := copy(ans, []byte(prefix))
|
||||
n := copy(ans, prefix)
|
||||
n += copy(ans[n:], data)
|
||||
copy(ans[n:], []byte(suffix))
|
||||
copy(ans[n:], suffix)
|
||||
return ans
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user