@xterm/xterm 6.1.0-beta.185 → 6.1.0-beta.186

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "6.1.0-beta.185",
4
+ "version": "6.1.0-beta.186",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -119,5 +119,5 @@
119
119
  "ws": "^8.2.3",
120
120
  "xterm-benchmark": "^0.3.1"
121
121
  },
122
- "commit": "89980fc565c178d13588e135f8eb975f44a47712"
122
+ "commit": "b0118dfd3a3e07c6e48336b7af4ca209d51488ab"
123
123
  }
@@ -414,7 +414,16 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
414
414
  this._register(addDisposableListener(this.textarea!, 'keyup', (ev: KeyboardEvent) => this._keyUp(ev), true));
415
415
  this._register(addDisposableListener(this.textarea!, 'keydown', (ev: KeyboardEvent) => this._keyDown(ev), true));
416
416
  this._register(addDisposableListener(this.textarea!, 'keypress', (ev: KeyboardEvent) => this._keyPress(ev), true));
417
- this._register(addDisposableListener(this.textarea!, 'compositionstart', () => this._compositionHelper!.compositionstart()));
417
+ this._register(addDisposableListener(this.textarea!, 'compositionstart', () => {
418
+ // Ensure the textarea is synced to the latest cursor location before composition begins. This
419
+ // is to workaround a problem where highly dynamic TUIs like agentic CLIs reprint agressively
420
+ // would cause the IME to appear in the wrong position. The theory is that when the IME is
421
+ // triggered during a partial render the textarea position becomes locked and will not move
422
+ // until it is hidden and a custom move occurs.
423
+ this._syncTextArea();
424
+ this._compositionHelper!.compositionstart();
425
+ this._compositionHelper!.updateCompositionElements();
426
+ }));
418
427
  this._register(addDisposableListener(this.textarea!, 'compositionupdate', (e: CompositionEvent) => this._compositionHelper!.compositionupdate(e)));
419
428
  this._register(addDisposableListener(this.textarea!, 'compositionend', () => this._compositionHelper!.compositionend()));
420
429
  this._register(addDisposableListener(this.textarea!, 'input', (ev: InputEvent) => this._inputEvent(ev), true));
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.185';
9
+ export const XTERM_VERSION = '6.1.0-beta.186';