diff kitten: Automatically use dark/light color scheme based on the color scheme of the parent terminal

Fixes #8170
This commit is contained in:
Kovid Goyal
2025-01-04 12:57:33 +05:30
parent 134271be93
commit e34a899ea6
6 changed files with 208 additions and 128 deletions

View File

@@ -112,7 +112,6 @@ func main(_ *cli.Command, opts_ *Options, args []string) (rc int, err error) {
return 1, err
}
init_caches()
create_formatters()
defer func() {
for tdir := range remote_dirs {
os.RemoveAll(tdir)
@@ -154,6 +153,7 @@ func main(_ *cli.Command, opts_ *Options, args []string) (rc int, err error) {
if !tc.KeyboardProtocol {
return fmt.Errorf("This terminal does not support the kitty keyboard protocol, or you are running inside a terminal multiplexer that is blocking querying for kitty keyboard protocol support. The diff kitten cannot function without it.")
}
h.on_capabilities_received(tc)
return nil
}
lp.OnWakeup = h.on_wakeup