pi-fabric 0.132.8 → 0.132.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5795,8 +5795,7 @@ function installFabricEscapeHalt(context, options) {
5795
5795
  }
5796
5796
 
5797
5797
  // src/ui/shell-hang-keys.ts
5798
- var CTRL_B = "";
5799
- var CTRL_K = "\v";
5798
+ import { matchesKey as matchesKey3 } from "@earendil-works/pi-tui";
5800
5799
  var CTRL_B_CHORD_MS = 1e3;
5801
5800
  function installFabricShellHangKeys(context, options) {
5802
5801
  if (context.mode !== "tui" || typeof context.ui.onTerminalInput !== "function") return () => {
@@ -5819,12 +5818,13 @@ function installFabricShellHangKeys(context, options) {
5819
5818
  }
5820
5819
  const jobs = options.jobs();
5821
5820
  const shells = jobs?.waiting().length ?? 0;
5822
- const programs = shells === 0 && data === CTRL_B && editorEmpty(context) ? options.programs?.() : void 0;
5821
+ const ctrlB = matchesKey3(data, "ctrl+b");
5822
+ const programs = shells === 0 && ctrlB && editorEmpty(context) ? options.programs?.() : void 0;
5823
5823
  if (!jobs || shells === 0 && !programs?.waiting()) {
5824
5824
  chordArmedAt = 0;
5825
5825
  return void 0;
5826
5826
  }
5827
- if (data === CTRL_B) {
5827
+ if (ctrlB) {
5828
5828
  const now = Date.now();
5829
5829
  if (chordArmedAt > 0 && now - chordArmedAt <= CTRL_B_CHORD_MS) {
5830
5830
  chordArmedAt = 0;
@@ -5852,7 +5852,7 @@ function installFabricShellHangKeys(context, options) {
5852
5852
  return { consume: true };
5853
5853
  }
5854
5854
  chordArmedAt = 0;
5855
- if (data === CTRL_K) {
5855
+ if (matchesKey3(data, "ctrl+k")) {
5856
5856
  const count = jobs.killWaiting();
5857
5857
  if (count > 0) {
5858
5858
  context.ui.notify(
@@ -7053,4 +7053,4 @@ export {
7053
7053
  FABRIC_MANAGED_HOST_VERSION,
7054
7054
  createFabricExtension
7055
7055
  };
7056
- //# sourceMappingURL=chunk-HWZ2HQZD.js.map
7056
+ //# sourceMappingURL=chunk-6NSPFTXC.js.map