Skip to content

Commit cac7fd4

Browse files
committed
fix: git-grep path should be absolute path
1 parent 7bf9f3e commit cac7fd4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

builtin/curator/git_grep.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { TextLineStream } from "@std/streams/text-line-stream";
22
import * as fn from "@denops/std/function";
3+
import { SEPARATOR } from "@std/path/constants";
34

45
import { type Curator, defineCurator } from "../../curator.ts";
56

@@ -65,13 +66,14 @@ export function gitGrep(): Curator<Detail> {
6566
continue;
6667
}
6768
const { path, line, column, context } = result;
69+
const abspath = `${cwd}${SEPARATOR}${path}`;
6870

6971
// Yield a structured item for each matched line
7072
yield {
7173
id: id++,
72-
value: `${path}:${line}:${column}:${context}`,
74+
value: `${abspath}:${line}:${column}:${context}`,
7375
detail: {
74-
path,
76+
path: abspath,
7577
line,
7678
column,
7779
context,

0 commit comments

Comments
 (0)