@hexdspace/react 0.1.47 → 0.1.48
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/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3370,7 +3370,13 @@ var VimHandleKeyUseCase = class {
|
|
|
3370
3370
|
if (e.ctrlKey || e.metaKey || e.altKey) return;
|
|
3371
3371
|
const scopeId = this.query.getActiveScope();
|
|
3372
3372
|
if (!scopeId) return;
|
|
3373
|
+
const activeKey = this.query.getActiveRegion(scopeId);
|
|
3374
|
+
if (!activeKey) return;
|
|
3375
|
+
const hasSelection = this.hasSelection(activeKey);
|
|
3373
3376
|
this.selection.clearSelection({ kind: "activeScope" });
|
|
3377
|
+
if (!hasSelection) {
|
|
3378
|
+
this.selection.setCursor(activeKey, null);
|
|
3379
|
+
}
|
|
3374
3380
|
const st = this.stateByScope.get(scopeId);
|
|
3375
3381
|
if (st) {
|
|
3376
3382
|
st.count = "";
|
|
@@ -3451,6 +3457,9 @@ var VimHandleKeyUseCase = class {
|
|
|
3451
3457
|
const index = items.indexOf(cursor);
|
|
3452
3458
|
return index >= 0 ? index : null;
|
|
3453
3459
|
}
|
|
3460
|
+
hasSelection(key) {
|
|
3461
|
+
return this.query.getSelectedIds(key).length > 0 || this.query.getToggledIds(key).length > 0 || this.query.getRangeIds(key).length > 0;
|
|
3462
|
+
}
|
|
3454
3463
|
findNextNonEmptyRegion(scopeId, activeKey, dir, count) {
|
|
3455
3464
|
const regs = this.regions.list(scopeId);
|
|
3456
3465
|
if (regs.length === 0) return null;
|