@thazhemadam/pi-vim 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/editor.js +10 -0
  2. package/package.json +2 -2
package/dist/editor.js CHANGED
@@ -66,6 +66,16 @@ export class VimPiEditor extends VimEditor(PiEditorHost) {
66
66
  const previousSnapshot = this.vimSnapshot;
67
67
  const previousMode = getVimMode(previousSnapshot);
68
68
  const event = piInputToVimEvent(data);
69
+ // Pi normally gives its autocomplete picker first refusal on Escape. Let
70
+ // the host dismiss it before Vim can use the same key to leave Insert or
71
+ // Replace mode; otherwise the picker can survive into Normal mode.
72
+ if (isInsertHistorySession(previousSnapshot) &&
73
+ this.isShowingAutocomplete() &&
74
+ this.appKeybindings.matches(data, "app.interrupt")) {
75
+ super.handleInput(data);
76
+ this.tui.requestRender();
77
+ return;
78
+ }
69
79
  if (this.handleNormalHistoryKey(previousSnapshot, event.key)) {
70
80
  this.tui.requestRender();
71
81
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thazhemadam/pi-vim",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "LGPL-3.0-only",
5
5
  "description": "Vim-style modal editing integration for Pi.",
6
6
  "type": "module",
@@ -57,7 +57,7 @@
57
57
  "@earendil-works/pi-tui": ">=0.79.8 <=0.84.2"
58
58
  },
59
59
  "dependencies": {
60
- "@thazhemadam/vim-state": "^0.1.0",
60
+ "@thazhemadam/vim-state": "^0.1.1",
61
61
  "xstate": "5.32.1"
62
62
  },
63
63
  "devDependencies": {