File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
export type {
2
2
Context ,
3
3
Dispatcher ,
4
- } from "https://deno.land/x/denops@v0.10/mod.ts" ;
5
- export {
6
- Denops ,
7
- getCacheOrElse ,
8
- } from "https://deno.land/x/denops@v0.10/mod.ts" ;
4
+ } from "https://deno.land/x/denops_core@v0.10.0/mod.ts" ;
5
+ export { Denops } from "https://deno.land/x/denops_core@v0.10.0/mod.ts" ;
Original file line number Diff line number Diff line change 1
- import { Context , Denops , Dispatcher , getCacheOrElse } from "../deps.ts" ;
1
+ import { Context , Denops , Dispatcher } from "../deps.ts" ;
2
2
import { execute } from "./execute.ts" ;
3
3
import { autocmd , AutocmdHelper } from "./autocmd.ts" ;
4
4
import { VariableHelper } from "./variable.ts" ;
5
5
6
6
export class Vim {
7
+ static instance ?: Vim ;
8
+
7
9
#denops: Denops ;
8
10
9
11
readonly g : VariableHelper ;
@@ -22,9 +24,10 @@ export class Vim {
22
24
}
23
25
24
26
static get ( ) : Vim {
25
- return getCacheOrElse ( "vim" , ( ) => {
26
- return new Vim ( Denops . get ( ) ) ;
27
- } ) ;
27
+ if ( ! Vim . instance ) {
28
+ Vim . instance = new Vim ( Denops . get ( ) ) ;
29
+ }
30
+ return Vim . instance ;
28
31
}
29
32
30
33
get name ( ) : string {
You can’t perform that action at this time.
0 commit comments