@oh-my-pi/pi-tui 6.8.0 → 6.8.2
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/package.json +1 -1
- package/src/components/editor.ts +2 -0
- package/src/tui.ts +3 -1
package/package.json
CHANGED
package/src/components/editor.ts
CHANGED
|
@@ -290,6 +290,7 @@ export class Editor implements Component, Focusable {
|
|
|
290
290
|
private autocompleteList?: SelectList;
|
|
291
291
|
private isAutocompleting: boolean = false;
|
|
292
292
|
private autocompletePrefix: string = "";
|
|
293
|
+
public onAutocompleteUpdate?: () => void;
|
|
293
294
|
|
|
294
295
|
// Paste tracking for large pastes
|
|
295
296
|
private pastes: Map<number, string> = new Map();
|
|
@@ -689,6 +690,7 @@ export class Editor implements Component, Focusable {
|
|
|
689
690
|
// Only pass arrow keys to the list, not Enter/Tab (we handle those directly)
|
|
690
691
|
if (matchesKey(data, "up") || matchesKey(data, "down")) {
|
|
691
692
|
this.autocompleteList.handleInput(data);
|
|
693
|
+
this.onAutocompleteUpdate?.();
|
|
692
694
|
return;
|
|
693
695
|
}
|
|
694
696
|
|
package/src/tui.ts
CHANGED
|
@@ -1090,7 +1090,9 @@ export class TUI extends Container {
|
|
|
1090
1090
|
this.terminal.write(buffer);
|
|
1091
1091
|
|
|
1092
1092
|
// Track cursor position for next render
|
|
1093
|
-
|
|
1093
|
+
// cursorRow represents end-of-content for viewport calculations,
|
|
1094
|
+
// hardwareCursorRow tracks actual cursor position (may move to cursorPos below)
|
|
1095
|
+
this.cursorRow = Math.max(0, newLines.length - 1);
|
|
1094
1096
|
this.hardwareCursorRow = finalCursorRow;
|
|
1095
1097
|
|
|
1096
1098
|
// Position hardware cursor for IME
|