[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 1/3] kedit: Hightlighing-Fix fuer escapte Zeichen in einem String



! kedit: Ein Backslash innerhalb eines Strings am Zeilenende hat zu
  einer Endlosschleife gefuehrt, weil die Position nicht erhoeht wurde
---
 src/modules/pas/kedit/syntax.pas |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/modules/pas/kedit/syntax.pas b/src/modules/pas/kedit/syntax.pas
index b6c6a8d..4248a2f 100644
--- a/src/modules/pas/kedit/syntax.pas
+++ b/src/modules/pas/kedit/syntax.pas
@@ -379,7 +379,9 @@ begin
                     '\':
                         begin
                             f_state := 5;
-                            exit(Highlight(syn_string_special));
+                            Next := Highlight(syn_string_special);
+                            Inc(pos);
+                            exit;
                         end;
 
                     '"':
@@ -393,8 +395,7 @@ begin
             5: { Escaptes Zeichen in einem String }
                 begin
                     f_state := 4;
-                    Inc(pos, 2);
-                    if pos > length(line) then pos := length(line);
+                    Inc(pos);
                     exit(Highlight(syn_string));
                 end;
 
-- 
1.6.0.2