File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const decoder = new TextDecoder("utf-8", { fatal: true });
9
9
10
10
type Detail = {
11
11
path : string ;
12
+ previewPath ?: string ;
12
13
line ?: number ;
13
14
column ?: number ;
14
15
} ;
@@ -23,10 +24,12 @@ type Detail = {
23
24
*/
24
25
export function file ( ) : Previewer < Detail > {
25
26
return definePreviewer ( async ( denops , { item } , { signal } ) => {
27
+ const path = item . detail . previewPath ?? item . detail . path ;
28
+
26
29
// Resolve the absolute path of the file
27
- const abspath = isAbsolute ( item . detail . path )
28
- ? item . detail . path
29
- : await fn . fnamemodify ( denops , item . detail . path , ":p" ) ;
30
+ const abspath = isAbsolute ( path )
31
+ ? path
32
+ : await fn . fnamemodify ( denops , path , ":p" ) ;
30
33
signal ?. throwIfAborted ( ) ;
31
34
32
35
try {
You can’t perform that action at this time.
0 commit comments