diff --git a/metainfo.xml b/metainfo.xml
index d666b52e16..c277924adb 100644
--- a/metainfo.xml
+++ b/metainfo.xml
@@ -120,6 +120,7 @@
Fixes double line box drawing characters
Fixes DECRQM (DEC Request Mode) response (#1797)
Fixes Precondition failure when rendering vertically overflowing glyphs (#1805)
+ Fixes fish-shell keyboard input protocol behaviour; acting as if it would be broken on e.g. control keys (weird handling of CSIu input protocol)
Enables customizing predefined color palette (#1763)
Ensure inserting new tabs happens right next to the currently active tab (#1695)
Allow glyphs to underflow if they are not bigger than the cell size (#1603)
diff --git a/src/vtbackend/Functions.h b/src/vtbackend/Functions.h
index 6385a268a5..30720e3531 100644
--- a/src/vtbackend/Functions.h
+++ b/src/vtbackend/Functions.h
@@ -517,7 +517,7 @@ constexpr inline auto CHA = detail::CSI(std::nullopt, 0, 1, std::nullopt
constexpr inline auto CHT = detail::CSI(std::nullopt, 0, 1, std::nullopt, 'I', VTType::VT100, documentation::CHT);
constexpr inline auto CNL = detail::CSI(std::nullopt, 0, 1, std::nullopt, 'E', VTType::VT100, documentation::CNL);
constexpr inline auto CPL = detail::CSI(std::nullopt, 0, 1, std::nullopt, 'F', VTType::VT100, documentation::CPL);
-constexpr inline auto CSIUENHCE = detail::CSI('=', 1, 2, std::nullopt, 'u', VTExtension::Unknown, documentation::CSIUENHCE);
+constexpr inline auto CSIUENHCE = detail::CSI('=', 0, 2, std::nullopt, 'u', VTExtension::Unknown, documentation::CSIUENHCE);
constexpr inline auto CSIUENTER = detail::CSI('>', 0, 1, std::nullopt, 'u', VTExtension::Unknown, documentation::CSIUENTER);
constexpr inline auto CSIULEAVE = detail::CSI('<', 0, 1, std::nullopt, 'u', VTExtension::Unknown, documentation::CSIULEAVE);
constexpr inline auto CSIUQUERY = detail::CSI('?', 0, 0, std::nullopt, 'u', VTExtension::Unknown, documentation::CSIUQUERY);
diff --git a/src/vtbackend/Screen.cpp b/src/vtbackend/Screen.cpp
index ae5c601a22..bf75f465ea 100644
--- a/src/vtbackend/Screen.cpp
+++ b/src/vtbackend/Screen.cpp
@@ -3636,10 +3636,9 @@ ApplyResult Screen::apply(Function const& function, Sequence const& seq)
return ApplyResult::Ok;
}
case CSIUENHCE: {
- auto const flags = KeyboardEventFlags::from_value(seq.param_or(0, 1));
+ // Defaulting flags to 0. (Seems not to be documented by the spec, but Fish shell is doing that!)
+ auto const flags = KeyboardEventFlags::from_value(seq.param_or(0, 0));
auto const mode = seq.param_or(1, 1);
- if (_terminal->keyboardProtocol().stackDepth() <= 1)
- return ApplyResult::Invalid;
switch (mode)
{
case 1: _terminal->keyboardProtocol().flags() = flags; return ApplyResult::Ok;
|