Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ic-768 committed Jun 13, 2024
1 parent d039bb3 commit b7868c5
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/actions/globalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -789,17 +789,24 @@ export function loadGlobalActions(action: ActionExplorer) {
.map((it) => source.bufManager.getBufferNode(it.bufnr)?.fullpath)
.filter(Boolean) as string[];
await nvim.call('setqflist', [
nodes.reduce<{ filename: string; text: string; lnum: number; }[]>((acc, it) => {
if (it.fullpath && !it.expandable && !existFullpaths.includes(it.fullpath)) {
const relative = pathLib.relative(source.root, it.fullpath);
acc.push({
filename: it.fullpath,
text: relative,
lnum: 1,
});
}
return acc;
}, []),
nodes.reduce<{ filename: string; text: string; lnum: number }[]>(
(acc, it) => {
if (
it.fullpath &&
!it.expandable &&
!existFullpaths.includes(it.fullpath)
) {
const relative = pathLib.relative(source.root, it.fullpath);
acc.push({
filename: it.fullpath,
text: relative,
lnum: 1,
});
}
return acc;
},
[],
),
action,
]);
const openCommand = (await nvim.getVar(
Expand Down

0 comments on commit b7868c5

Please sign in to comment.