Skip to content

Commit c870668

Browse files
committed
Fix Ctrl+Click link ranges to include $ prefix in macros and extrinsics
1 parent 2969cae commit c870668

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/ccs/features/definitionLookup/extractQuery.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ const MATCHERS: DefinitionMatcher[] = [
9393
return [
9494
createToken({
9595
line,
96-
start: labelStart,
96+
start,
9797
end: labelEnd,
98+
activationStart: start,
9899
query: text,
99100
normalizedQuery: normalized,
100101
kind: "labelRoutine",
@@ -193,16 +194,12 @@ const MATCHERS: DefinitionMatcher[] = [
193194
regex: MACRO_REGEX,
194195
buildTokens: ({ line, start, text, match }) => {
195196
const [, macroName] = match;
196-
const macroStart = start + (text.length - macroName.length);
197-
if (macroStart < start) {
198-
return [];
199-
}
200-
const macroEnd = macroStart + macroName.length;
197+
const macroEnd = start + text.length;
201198

202199
return [
203200
createToken({
204201
line,
205-
start: macroStart,
202+
start,
206203
end: macroEnd,
207204
activationStart: start,
208205
query: text,

0 commit comments

Comments
 (0)