From 1fedf97ba3321ea9c4c3ef64990483d73e41a8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=BD=D0=B4=D0=B0=D1=80=D0=B5=D0=B2=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD?= Date: Thu, 14 Jun 2018 21:54:15 +0200 Subject: [PATCH] fix #898 --- .../CodeCompletion/CodeCompletionHighlighter.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionHighlighter.cs b/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionHighlighter.cs index b151a7bcf..bd532eb57 100644 --- a/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionHighlighter.cs +++ b/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionHighlighter.cs @@ -118,8 +118,18 @@ namespace VisualPascalABC if (CheckForCommentOrKav(textArea.Document.TextContent, beg_off)) return false; char c = textArea.Document.TextContent[off]; - while (char.IsWhiteSpace(c)) + while (char.IsWhiteSpace(c) || c == '}') { + if (c == '}') + { + while (c != '{') + { + off--; + if (off < 0) + break; + c = textArea.Document.TextContent[off]; + } + } off--; if (off < 0) return false; @@ -130,6 +140,8 @@ namespace VisualPascalABC { return true; } + + if (c == 't' || c == 'd' || c == 'o') { StringBuilder keyword = new StringBuilder(); @@ -389,6 +401,8 @@ namespace VisualPascalABC i = off; while (i < Text.Length && !is_comm && Text[i] != '\n') { + if (Text[i] == '{') + return false; if (Text[i] == '}') { return true;