From 6ad8880c7861639c06fa3e9eefbdc8a6a8df2256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Tue, 13 Sep 2011 23:37:48 +0000 Subject: [PATCH] [GB.QT4.EXT] * BUG: Fix a crash in folding procedure, by strictly folding between procedure limits, and by not trying to be clever with comments. git-svn-id: svn://localhost/gambas/trunk@4125 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.qt4/src/ext/gview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gb.qt4/src/ext/gview.cpp b/gb.qt4/src/ext/gview.cpp index 5b69d56d1..c0a15f08b 100644 --- a/gb.qt4/src/ext/gview.cpp +++ b/gb.qt4/src/ext/gview.cpp @@ -2473,8 +2473,10 @@ void GEditor::foldLine(int row, bool no_refresh) if (end < 0) end = numLines() - 1; else + end--; + /*else { - for(;;) + while (end > start) { end--; l = doc->lines.at(end); @@ -2482,7 +2484,7 @@ void GEditor::foldLine(int row, bool no_refresh) if (!l->highlight || (l->highlight[0].state != GLine::Comment && l->highlight[0].state != GLine::Help)) break; } - } + }*/ pos = -1; for (i = 0; i < fold.count(); i++)