We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46704b6 commit 858ad8dCopy full SHA for 858ad8d
termimg.go
@@ -338,6 +338,18 @@ func ClearAll() error {
338
return err
339
}
340
341
+// ClearAllString returns a command to clear all images drawn by the Kitty protocol as a string.
342
+func ClearAllString() string {
343
+ // This command is specific to the Kitty renderer, but it's safe to send
344
+ // as other terminals will ignore it.
345
+ control := "a=d"
346
+ output := fmt.Sprintf("\x1b_G%s\x1b", control)
347
+ if inTmux() {
348
+ output = wrapTmuxPassthrough(output)
349
+ }
350
+ return output
351
+}
352
+
353
// Clear removes the image from the terminal
354
func (i *Image) Clear(opts ClearOptions) error {
355
renderer, err := i.getRenderer()
0 commit comments