aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--src/console/components/FindPrompt.tsx1
-rw-r--r--src/content/usecases/MarkUseCase.ts5
-rw-r--r--yarn.lock15
4 files changed, 10 insertions, 13 deletions
diff --git a/package.json b/package.json
index 7d06790..7a7a8a3 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"@types/react-test-renderer": "^17.0.0",
"@types/redux-promise": "^0.5.28",
"@types/selenium-webdriver": "^4.0.6",
- "@types/sinon": "^9.0.0",
+ "@types/sinon": "^10.0.0",
"@types/styled-components": "^5.1.2",
"@typescript-eslint/eslint-plugin": "3.9.0",
"@typescript-eslint/parser": "3.10.1",
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);
}
diff --git a/yarn.lock b/yarn.lock
index b47533b..892f9a9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -393,17 +393,12 @@
"@types/express-serve-static-core" "*"
"@types/mime" "*"
-"@types/sinon@^9.0.0":
- version "9.0.11"
- resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.11.tgz#7af202dda5253a847b511c929d8b6dda170562eb"
- integrity sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==
+"@types/sinon@^10.0.0":
+ version "10.0.0"
+ resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.0.tgz#eecc3847af03d45ffe53d55aaaaf6ecb28b5e584"
+ integrity sha512-jDZ55oCKxqlDmoTBBbBBEx+N8ZraUVhggMZ9T5t+6/Dh8/4NiOjSUfpLrPiEwxQDlAe3wpAkoXhWvE6LibtsMQ==
dependencies:
- "@types/sinonjs__fake-timers" "*"
-
-"@types/sinonjs__fake-timers@*":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz#681df970358c82836b42f989188d133e218c458e"
- integrity sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==
+ "@sinonjs/fake-timers" "^7.0.4"
"@types/source-list-map@*":
version "0.1.2"