From a13603f286fdc179c55d6d87ec6b627e549cbf0c Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 22 Oct 2015 01:25:02 +0200 Subject: [PATCH] fix, highlighter, unfinished escape character at EOF caused a char/string literal not to be displayed --- src/ce_d2syn.pas | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ce_d2syn.pas b/src/ce_d2syn.pas index f26939b6..129f5e16 100644 --- a/src/ce_d2syn.pas +++ b/src/ce_d2syn.pas @@ -661,8 +661,11 @@ begin if (reader^ = '\') then begin readerNext; - if fCurrRange.rString then continue; - readerNext; + if reader^ <> #10 then + begin + if fCurrRange.rString then continue; + readerNext; + end; end else if reader^ = '"' then begin @@ -685,8 +688,11 @@ begin if reader^ = '\' then begin readerNext; - if fCurrRange.rString then continue; - readerNext; + if reader^ <> #10 then + begin + if fCurrRange.rString then continue; + readerNext; + end; end else if reader^ = '"' then begin @@ -752,6 +758,8 @@ begin if reader^ = '\' then begin readerNext; + if reader^ = #10 then + exit; readerNext; end; if reader^ = #10 then