Skip to content

Commit

Permalink
Add command for hiding a specific hint (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-tejada committed May 14, 2024
1 parent cb4c913 commit 29cae1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/content/actions/runRangoActionWithTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ export async function runRangoActionWithTarget(
await saveReference(wrapper, request.arg);
break;

case "hideHint":
for (const wrapper of wrappers) {
wrapper.hint?.hide();
}

break;

default:
await notify(`Invalid action "${request.type}"`, {
type: "error",
Expand Down
3 changes: 2 additions & 1 deletion src/typings/RangoAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export interface RangoActionWithTargets {
| "scrollElementToCenter"
| "setSelectionBefore"
| "setSelectionAfter"
| "focusAndDeleteContents";
| "focusAndDeleteContents"
| "hideHint";
target: string[];
}

Expand Down

0 comments on commit 29cae1f

Please sign in to comment.