mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-19 22:55:29 +00:00
set-colors: Accept cursor_text_color background in color files
The Go client rejected the value, even though kitty.conf and the old Python client accept it and treat it as None. Fixes #10832
This commit is contained in:
parent
45cd5201e9
commit
f0286492d5
3 changed files with 9 additions and 1 deletions
|
|
@ -172,6 +172,9 @@ Detailed list of changes
|
|||
- ssh kitten: Fix directories such as :file:`~/.terminfo` being created world
|
||||
writable on the remote host on first connect (:iss:`10834`)
|
||||
|
||||
- Remote control: Fix ``kitten @ set-colors`` failing on color files containing
|
||||
``cursor_text_color background`` (:iss:`10832`)
|
||||
|
||||
|
||||
0.50.0 [2026-11-03]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
|
|
@ -322,6 +322,10 @@ func encode_special_color(key, val string) (int64, error) {
|
|||
}
|
||||
|
||||
func set_color_in_color_map(key, val string, ans map[string]any, check_nullable, skip_nullable bool) error {
|
||||
if key == "cursor_text_color" && val == "background" {
|
||||
// matches cursor_text_color() in kitty/options/utils.py
|
||||
val = "none"
|
||||
}
|
||||
if val == "none" {
|
||||
if check_nullable && !nullable_colors[key] {
|
||||
if skip_nullable {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ func TestSetColorsConfFiles(t *testing.T) {
|
|||
" background #0000ff",
|
||||
"font_size 12",
|
||||
"cursor none",
|
||||
"cursor_text_color background",
|
||||
"background_opacity 0.5",
|
||||
"wayland_titlebar_color background",
|
||||
"include base.conf",
|
||||
|
|
@ -72,7 +73,7 @@ func TestSetColorsConfFiles(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
expected := map[string]any{
|
||||
"foreground": uint32(0xff0000), "background": uint32(0xff), "cursor": nil,
|
||||
"foreground": uint32(0xff0000), "background": uint32(0xff), "cursor": nil, "cursor_text_color": nil,
|
||||
"selection_background": uint32(0xff00), "color1": uint32(0xaaaaaa),
|
||||
"wayland_titlebar_color": int64(1),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue