Fix a regression in the previous release that caused overriding of existing multi-key mappings to fail

Fixes #7044
This commit is contained in:
Kovid Goyal 2024-01-23 15:49:30 +05:30
parent f51520eb79
commit c76f75a154
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View file

@ -54,6 +54,8 @@ Detailed list of changes
- Fix a regression in the previous release that caused `kitten @ send-text` with a match tab parameter to send text twice to the active window (:iss:`7027`)
- Fix a regression in the previous release that caused overriding of existing multi-key mappings to fail (:iss:`7044`)
- Wayland+NVIDIA: Do not request an sRGB output buffer as a bug in Wayland causes kitty to not start (:iss:`7021`)
0.32.0 [2024-01-19]

View file

@ -118,7 +118,10 @@ def finalize_keys(opts: Options, accumulate_bad_lines: Optional[List[BadLine]] =
dl = defn.definition_location
accumulate_bad_lines.append(BadLine(dl.number, dl.line, KeyError(kerr), dl.file))
continue
m.keymap[defn.trigger].append(defn)
items = m.keymap[defn.trigger]
if defn.is_sequence:
items = m.keymap[defn.trigger] = [kd for kd in items if defn.rest != kd.rest or defn.options.when_focus_on != kd.options.when_focus_on]
items.append(defn)
opts.keyboard_modes = modes