mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-03 20:37:50 +03:00
tweaks
This commit is contained in:
parent
8622032552
commit
bf40a77e26
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user