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 });
99
1010type Detail = {
1111 path : string ;
12+ preview_path ?: string ;
1213 line ?: number ;
1314 column ?: number ;
1415} ;
@@ -23,10 +24,12 @@ type Detail = {
2324 */
2425export function file ( ) : Previewer < Detail > {
2526 return definePreviewer ( async ( denops , { item } , { signal } ) => {
27+ const path = item . detail . preview_path ?? item . detail . path ;
28+
2629 // 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" ) ;
3033 signal ?. throwIfAborted ( ) ;
3134
3235 try {
You can’t perform that action at this time.
0 commit comments