mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Fix regression breaking self-insert of kitty shifted codepoint
Commit 50a6e486a5 (Allow explicit shift modifier for non-ASCII
letters, fix capslock behavior, 2025-03-30) delayed handling of kitty
keyboard protocol's shifted codepoints. It does handle shifted
codepoints when matching keys to mappings; but it fails to handle
them in the self-insert code paths where we want to insert the text
represented by CharEvent::Key.
Fix it by resolving the shifted key.
Fixes #11813
This commit is contained in:
@@ -140,6 +140,13 @@ Changes to the argparse builtin
|
||||
|
||||
--------------
|
||||
|
||||
fish 4.0.9 (released ???)
|
||||
=========================
|
||||
|
||||
This release fixes a regression in 4.0.6 that caused shifted keys to not be inserted on some terminals.
|
||||
|
||||
--------------
|
||||
|
||||
fish 4.0.8 (released September 18, 2025)
|
||||
========================================
|
||||
|
||||
|
||||
@@ -171,10 +171,15 @@ pub fn from_single_byte(c: u8) -> Self {
|
||||
}
|
||||
|
||||
pub(crate) fn codepoint_text(&self) -> Option<char> {
|
||||
if self.modifiers.is_some() {
|
||||
let mut modifiers = self.modifiers;
|
||||
let mut c = self.codepoint;
|
||||
if self.shifted_codepoint != '\0' && modifiers.shift {
|
||||
modifiers.shift = false;
|
||||
c = self.shifted_codepoint;
|
||||
}
|
||||
if modifiers.is_some() {
|
||||
return None;
|
||||
}
|
||||
let c = self.codepoint;
|
||||
if c == key::Space {
|
||||
return Some(' ');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user