aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/console/components/FindPrompt.tsx1
-rw-r--r--src/content/usecases/MarkUseCase.ts5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/console/components/FindPrompt.tsx b/src/console/components/FindPrompt.tsx
index c437d16..552a09d 100644
--- a/src/console/components/FindPrompt.tsx
+++ b/src/console/components/FindPrompt.tsx
@@ -25,6 +25,7 @@ const FindPrompt: React.FC = () => {
const value = (e.target as HTMLInputElement).value;
execFind(value === "" ? undefined : value);
+ hide();
};
const onKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
diff --git a/src/content/usecases/MarkUseCase.ts b/src/content/usecases/MarkUseCase.ts
index 002fdee..f5f512c 100644
--- a/src/content/usecases/MarkUseCase.ts
+++ b/src/content/usecases/MarkUseCase.ts
@@ -18,7 +18,7 @@ export default class MarkUseCase {
async set(key: string): Promise<void> {
const pos = this.scrollPresenter.getScroll();
if (this.globalKey(key)) {
- this.client.setGloablMark(key, pos);
+ await this.client.setGloablMark(key, pos);
await this.consoleClient.info(`Set global mark to '${key}'`);
} else {
this.repository.set(key, pos);
@@ -32,7 +32,8 @@ export default class MarkUseCase {
} else {
const pos = this.repository.get(key);
if (!pos) {
- throw new Error("Mark is not set");
+ await this.consoleClient.error("Mark is not set");
+ return;
}
this.scroll(pos.x, pos.y);
}