Skip to content

Commit

Permalink
fix bug with preview start range
Browse files Browse the repository at this point in the history
  • Loading branch information
kortina committed May 31, 2020
1 parent ebde259 commit 3bb61bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/BacklinksTreeDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class BacklinkItem extends vscode.TreeItem {
if (s < 20) {
s = 0;
}
return line.substr(5);
return line.substr(s);
} else if (this.locations) {
d = `${this.locations?.length} References`;
}
Expand Down
10 changes: 5 additions & 5 deletions src/ReferenceSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ export class ReferenceSearch {
}
Array.from(candidates || []).map((match) => {
if (matchesQuery(match, contextWord)) {
console.log(
`${lineNum} Regex Range: (${match.index}, ${(match.index || 0) + match[0].length}) ${
match[0]
} `
);
// console.log(
// `${lineNum} Regex Range: (${match.index}, ${(match.index || 0) + match[0].length}) ${
// match[0]
// } `
// );
let s = match.index || 0;
let e = s + match[0].length;
let r: RawRange = {
Expand Down

0 comments on commit 3bb61bd

Please sign in to comment.