ecere/EditBox: Fixed continued lines showing up as comments ( Corrected fix for http...
authorJerome St-Louis <jerome@ecere.com>
Tue, 6 Sep 2011 03:39:55 +0000 (23:39 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 6 Sep 2011 03:39:55 +0000 (23:39 -0400)
ecere/src/gui/controls/EditBox.ec

index b23d3a4..e24bec4 100644 (file)
@@ -1372,9 +1372,7 @@ private:
             }
          }
          
             }
          }
          
-         continuedSingleLineComment = false;
-         if(line.count && line.text[line.count - 1] == '\\')
-            continuedSingleLineComment = true;
+         continuedSingleLineComment = inSingleLineComment && (line.count && line.text[line.count - 1] == '\\');
 
          style.inMultiLineComment = inMultiLineComment;
          style.inPrep = inPrep;
 
          style.inMultiLineComment = inMultiLineComment;
          style.inPrep = inPrep;
@@ -1883,9 +1881,7 @@ private:
          }
          */
          
          }
          */
          
-         continuedSingleLineComment = false;
-         if(line.count && line.text[line.count - 1] == '\\')
-            continuedSingleLineComment = true;
+         continuedSingleLineComment = inSingleLineComment && (line.count && line.text[line.count - 1] == '\\');
 
          y+=this.space.h;
          if(y > box.bottom) // >=clientSize.h) 
 
          y+=this.space.h;
          if(y > box.bottom) // >=clientSize.h)