@xterm/xterm 6.1.0-beta.93 → 6.1.0-beta.94

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.93",
4
+ "version": "6.1.0-beta.94",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -116,5 +116,5 @@
116
116
  "ws": "^8.2.3",
117
117
  "xterm-benchmark": "^0.3.1"
118
118
  },
119
- "commit": "729a6700431210261a92d2b0d245ed4fe67b7356"
119
+ "commit": "9bd128b315145f1ac66e4d61d3c68ba8e6dde59b"
120
120
  }
@@ -532,6 +532,9 @@ export class SelectionService extends Disposable implements ISelectionService {
532
532
  * @param event The mouse event.
533
533
  */
534
534
  private _handleSingleClick(event: MouseEvent): void {
535
+ // Track if there was a selection before clearing
536
+ const hadSelection = this.hasSelection;
537
+
535
538
  this._model.selectionStartLength = 0;
536
539
  this._model.isSelectAllActive = false;
537
540
  this._activeSelectionMode = this.shouldColumnSelect(event) ? SelectionMode.COLUMN : SelectionMode.NORMAL;
@@ -543,6 +546,11 @@ export class SelectionService extends Disposable implements ISelectionService {
543
546
  }
544
547
  this._model.selectionEnd = undefined;
545
548
 
549
+ // Fire selection change event if a selection was cleared
550
+ if (hadSelection) {
551
+ this._fireOnSelectionChange(this._model.finalSelectionStart, this._model.finalSelectionEnd, false);
552
+ }
553
+
546
554
  // Ensure the line exists
547
555
  const line = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);
548
556
  if (!line) {
@@ -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.93';
9
+ export const XTERM_VERSION = '6.1.0-beta.94';