Tags: patch, confirmed
Version: 0.19-1

I confirm this bug, and have a patch that fixes it. I also sent the
patch to upstream developers [1].

[1] http://lists.uvena.de/pipermail/geany-devel/2010-August/002990.html
Index: scintilla/LexMarkdown.cxx
===================================================================
--- scintilla/LexMarkdown.cxx	(révision 5161)
+++ scintilla/LexMarkdown.cxx	(copie de travail)
@@ -100,9 +100,9 @@
 static bool HasPrevLineContent(StyleContext &sc) {
     int i = 0;
     // Go back to the previous newline
-    while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i))) 
+    while ((--i + (int)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i)))
         ;
-    while (--i + sc.currentPos) {
+    while ((--i + (int)sc.currentPos) >= 0) {
         if (IsNewline(sc.GetRelative(i)))
             break;
         if (!IsASpaceOrTab(sc.GetRelative(i)))

Reply via email to