diff --git a/CHANGELOG.md b/CHANGELOG.md index 9da2677..b102d46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.24.2 + +* Добавлена передача кода диагностики для оскрипт-линтера +* Указание диапазона для найденного метода в запросе перехода к определению + ## 1.24.1 * Исправления сборки diff --git a/package-lock.json b/package-lock.json index 83c2dd6..88d3cee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "language-1c-bsl", - "version": "1.24.1", + "version": "1.24.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ce1a0e1..0ada995 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Language 1C (BSL)", "description": "Syntax highlighting for 1C:Enterprise 8.", "icon": "images/1c-syntax.png", - "version": "1.24.1", + "version": "1.24.2", "publisher": "1c-syntax", "galleryBanner": { "color": "#0000FF", diff --git a/src/features/definitionProvider.ts b/src/features/definitionProvider.ts index ba41ca1..7dd7748 100644 --- a/src/features/definitionProvider.ts +++ b/src/features/definitionProvider.ts @@ -93,9 +93,11 @@ export default class GlobalDefinitionProvider extends AbstractProvider // continue; // } added[element.name] = true; + const start = new vscode.Position(element.line, (element.isproc ? 9 : 7) + 1); + const end = new vscode.Position(start.line, start.character + element.name.length); const location = new vscode.Location( element.filename ? vscode.Uri.file(element.filename) : document.uri, - new vscode.Position(element.line, (element.isproc ? 9 : 7) + 1) + new vscode.Range(start, end) ); result.push(location); } diff --git a/src/features/lintProvider.ts b/src/features/lintProvider.ts index df75e72..17a9fa7 100644 --- a/src/features/lintProvider.ts +++ b/src/features/lintProvider.ts @@ -119,6 +119,7 @@ export default class LintProvider { errorMessage, vscode.DiagnosticSeverity.Error ); + vscodeDiagnostic.code = "oscript-check"; if (!errorFiles[fileName]) { errorFiles[fileName] = new Array(); }