Skip to content

Commit

Permalink
fix: quickfix exist files, using bufnr instead of the filename
Browse files Browse the repository at this point in the history
  • Loading branch information
weirongxu committed Jun 12, 2024
1 parent ff06ff9 commit 1ed37fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions/globalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ export function loadGlobalActions(action: ActionExplorer) {
async ({ args, nodes, source }) => {
const argAction = (args[0] ?? 'replace') as QuickfixAction;
const action = { add: 'a', replace: 'r' }[argAction];
const list: { filename?: string }[] = await nvim.call('getqflist');
const list: { bufnr: number }[] = await nvim.call('getqflist');
const existFullpathes = list
.map((it) => it.filename)
.map((it) => source.bufManager.getBufferNode(it.bufnr)?.fullpath)
.filter(Boolean) as string[];
await nvim.call('setqflist', [
nodes
Expand Down

0 comments on commit 1ed37fe

Please sign in to comment.