bunmicro 0.9.9 → 0.9.10

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.10] - 2026-06-04
4
+ - Up/Down key auto-complete selection in editor
5
+
3
6
  ## [0.9.9] - 2026-06-04
4
7
  - Added long line protection for softwrap
5
8
  * That means binary edits available
package/README.md CHANGED
@@ -40,7 +40,7 @@
40
40
  - Almost every component on the screen is clickable or double clickable
41
41
  - A complete help is at the end
42
42
  ## Auto-completions arrow keys
43
- - Press Tab and use arrow keys to select items
43
+ - Press Tab and use up/down keys to select auto-complete items
44
44
  ## action/js commands
45
45
  - A complete help is at the end
46
46
  ## Portability
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunmicro",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "Bun JavaScript rewrite of the micro editor originally in Golang",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -2551,8 +2551,8 @@ class App {
2551
2551
  // Reset undo insert chain on any non-printable-char key
2552
2552
  if (!(seq === text && text.length === 1 && text >= " ")) this._undoInsertChain = false;
2553
2553
 
2554
- // Any key other than tab/backtab clears the autocomplete cycle state
2555
- if (seq !== "tab" && seq !== "backtab" && buf?.acHas) buf.clearAutocomplete();
2554
+ // Keep autocomplete active while cycling candidates with Tab/Shift-Tab or Up/Down.
2555
+ if (!["tab", "backtab", "up", "down"].includes(seq) && buf?.acHas) buf.clearAutocomplete();
2556
2556
 
2557
2557
  switch (seq) {
2558
2558
  case "escape": {
@@ -2799,10 +2799,18 @@ class App {
2799
2799
  buf.moveRight();
2800
2800
  break;
2801
2801
  case "up":
2802
+ if (buf.acHas) {
2803
+ buf.cycleAutocomplete(false);
2804
+ break;
2805
+ }
2802
2806
  this.pane.selection = null;
2803
2807
  this._moveUpVisual(buf, this.pane);
2804
2808
  break;
2805
2809
  case "down":
2810
+ if (buf.acHas) {
2811
+ buf.cycleAutocomplete(true);
2812
+ break;
2813
+ }
2806
2814
  this.pane.selection = null;
2807
2815
  this._moveDownVisual(buf, this.pane);
2808
2816
  break;