You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably a separate bug, however when I hover above a command / intrinsic
function ($get etc.) I see the information display - nice work.
Hover over a non-word and the log shows
[2019-07-02 10:02:15.770] [exthost] [error] TypeError: Cannot read property
'end' of undefined
at ObjectScriptHoverProvider.dollars
(c:\Users\Administrator.vscode\extensions\daimor.vscode-objectscript-0.7.11\out\providers\ObjectScriptHoverProvider.js:25:133)
Reviewing the typescipt I see:
public dollars(document: vscode.TextDocument, position: vscode.Position):
vscode.ProviderResult<vscode.Hover> {
const word = document.getWordRangeAtPosition(position);
const text = document.getText(
new vscode.Range(new vscode.Position(position.line, 0), new
vscode.Position(position.line, word.end.character)),
);
Probably needs some defensive coding around the word object before it's
used.
On Tue, 2 Jul 2019 at 09:38, Dmitry Maslennikov [email protected]
wrote:
The code is
Class User.Test1 Extends %RegisteredObject
{
Method Method1() As %Status
{
set a = $get(^B)
}
}
Hover above the open brace under the Method declaration and the error
appears in the Log (Extension Host) window
Probably a separate bug, however when I hover above a command / intrinsic
function ($get etc.) I see the information display - nice work.
Hover over a non-word and the log shows
[2019-07-02 10:02:15.770] [exthost] [error] TypeError: Cannot read property
'end' of undefined
at ObjectScriptHoverProvider.dollars
(c:\Users\Administrator.vscode\extensions\daimor.vscode-objectscript-0.7.11\out\providers\ObjectScriptHoverProvider.js:25:133)
Reviewing the typescipt I see:
public dollars(document: vscode.TextDocument, position: vscode.Position):
vscode.ProviderResult<vscode.Hover> {
const word = document.getWordRangeAtPosition(position);
const text = document.getText(
new vscode.Range(new vscode.Position(position.line, 0), new
vscode.Position(position.line, word.end.character)),
);
Probably needs some defensive coding around the word object before it's
used.
On Tue, 2 Jul 2019 at 09:38, Dmitry Maslennikov [email protected]
wrote:
Originally posted by @davbro63 in #41 (comment)
The text was updated successfully, but these errors were encountered: