diff --git a/VisualPascalABCNET/Workbench/WindowOperations.cs b/VisualPascalABCNET/Workbench/WindowOperations.cs index f2bc6d1bc..17d8ac9be 100644 --- a/VisualPascalABCNET/Workbench/WindowOperations.cs +++ b/VisualPascalABCNET/Workbench/WindowOperations.cs @@ -399,7 +399,9 @@ namespace VisualPascalABC SetFocusToEditor(); } - CodeCompletion.CodeCompletionController.SetLanguage(CurrentCodeFileDocument.FileName); + // В Linux версии это в начале работы + if (CurrentCodeFileDocument != null) + CodeCompletion.CodeCompletionController.SetLanguage(CurrentCodeFileDocument.FileName); bool intellisenseAvailable = CodeCompletion.CodeCompletionController.IntellisenseAvailable(); diff --git a/VisualPascalABCNETLinux/Workbench/WindowOperations.cs b/VisualPascalABCNETLinux/Workbench/WindowOperations.cs index af0a89738..2fef14008 100644 --- a/VisualPascalABCNETLinux/Workbench/WindowOperations.cs +++ b/VisualPascalABCNETLinux/Workbench/WindowOperations.cs @@ -411,7 +411,9 @@ namespace VisualPascalABC SetFocusToEditor(); } - CodeCompletion.CodeCompletionController.SetLanguage(CurrentCodeFileDocument.FileName); + // В Linux версии это в начале работы + if (CurrentCodeFileDocument != null) + CodeCompletion.CodeCompletionController.SetLanguage(CurrentCodeFileDocument.FileName); bool intellisenseAvailable = CodeCompletion.CodeCompletionController.IntellisenseAvailable();