Skip to content

Commit

Permalink
Fixes #358
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed Jan 9, 2025
1 parent 3c2f06a commit e018d9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [2.7.0] - 2025-XX-XX
- Fix issue [#357](https://github.com/intersystems/language-server/issues/357): Add completion for globals and routines
- Fix issue [#358](https://github.com/intersystems/language-server/issues/358): Uncaught error when hovering over a macro that's defined as empty in the current document

## [2.6.5] - 2024-11-13
- Fix issue [#356](https://github.com/intersystems/language-server/issues/356): Unexpected new dialog during password retrieval using Server Manager authprovider
Expand Down
6 changes: 6 additions & 0 deletions server/src/providers/hover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ export async function onHover(params: TextDocumentPositionParams): Promise<Hover
}
}
}
if (definitionendtkn == (parsed[ln].length - 1)) {
// This is an empty macro definition
break;
}
}

if (
Expand Down Expand Up @@ -238,6 +242,8 @@ export async function onHover(params: TextDocumentPositionParams): Promise<Hover
}
}

if (definition == "") return null;

// If this macro has a formal spec, attempt to replace the parameters with the arguments from the usage
if (formalspec.endsWith(")")) {
let macroargs = getMacroArgs();
Expand Down

0 comments on commit e018d9a

Please sign in to comment.