Skip to content

Commit 7de959b

Browse files
committed
Fix: set appName from denops.name
1 parent ab0b43e commit 7de959b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# WIP: denops_app
22

33
UI module for [denops.vim](https://github.com/vim-denops/denops.vim).
4+
5+
```typescript

app.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Buffer } from "./buffer.ts";
33
import { Component, Route } from "./router.ts";
44

55
export class DenopsApp {
6-
#appName: string;
76
#routes: {
87
pathRegexp: RegExp;
98
component: Component;
@@ -14,8 +13,7 @@ export class DenopsApp {
1413
path: string;
1514
}[];
1615

17-
constructor(appName: string, denops: Denops) {
18-
this.#appName = appName;
16+
constructor(denops: Denops) {
1917
this.#routes = [];
2018
this.#denops = denops;
2119
this.#commands = [];
@@ -69,11 +67,11 @@ export class DenopsApp {
6967

7068
await group(
7169
this.#denops,
72-
`${this.#appName}-buffer`,
70+
`${this.#denops.name}-buffer`,
7371
(helper: GroupHelper) => {
7472
helper.define(
7573
"BufReadCmd",
76-
`denopsapp://${this.#appName}/*`,
74+
`denopsapp://${this.#denops.name}/*`,
7775
`call denops#notify('${this.#denops.name}', 'renderContents', [expand('<amatch>')])`,
7876
);
7977
},

0 commit comments

Comments
 (0)