This commit is contained in:
Pokey Rule 2023-11-29 15:52:51 +00:00 committed by Josh Bleecher Snyder
parent 8622032552
commit bf40a77e26
2 changed files with 2 additions and 15 deletions

View File

@ -11,6 +11,8 @@ export class StoredTargetMap {
private notifier = new Notifier<[StoredTargetKey, Target[] | undefined]>();
set(key: StoredTargetKey, targets: Target[] | undefined) {
// TODO: Figure out how to set a target to undefined
// Maybe need separate command?
this.targetMap.set(key, targets);
this.notifier.notifyListeners(key, targets);
}

View File

@ -170,17 +170,6 @@ export default class KeyboardCommandsTargeted {
},
});
private highlightTarget = () =>
executeCursorlessCommand({
name: "highlight",
target: {
type: "primitive",
mark: {
type: "that",
},
},
});
/**
* Performs action {@link name} on the current target
* @param name The action to run
@ -259,8 +248,6 @@ export default class KeyboardCommandsTargeted {
});
const returnValue = await executeCursorlessCommand(action);
await this.highlightTarget();
if (EXIT_CURSORLESS_MODE_ACTIONS.includes(action.name)) {
// For some Cursorless actions, it is more convenient if we automatically
// exit modal mode
@ -305,8 +292,6 @@ export default class KeyboardCommandsTargeted {
},
});
await this.highlightTarget();
if (exitCursorlessMode) {
// For some Cursorless actions, it is more convenient if we automatically
// exit modal mode