aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-03-23 08:57:19 +0000
committernyamatongwe <devnull@localhost>2000-03-23 08:57:19 +0000
commit85445714cbaacc753fb60be7db7549b049be79f3 (patch)
tree7e6ab8429636e1915f7554ebd6663485cbd23e73
parentff69e140ac7634ab8ec4365f97f0adae27692b53 (diff)
downloadscintilla-mirror-85445714cbaacc753fb60be7db7549b049be79f3.tar.gz
Fixed bug in ContractionState when files larer than 400 lines had fold points set.
Fixed block comments in PLSQL.
-rw-r--r--src/ContractionState.cxx8
-rw-r--r--src/LexSQL.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx
index 6f41461eb..816d06aae 100644
--- a/src/ContractionState.cxx
+++ b/src/ContractionState.cxx
@@ -108,8 +108,8 @@ void ContractionState::InsertLines(int lineDoc, int lineCount) {
return;
}
//Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc);
- if ((linesInDoc + 2) >= size) {
- Grow(size + growSize);
+ if ((linesInDoc + lineCount + 2) >= size) {
+ Grow(linesInDoc + lineCount + growSize);
}
linesInDoc += lineCount;
linesInDisplay += lineCount;
@@ -155,7 +155,7 @@ bool ContractionState::GetVisible(int lineDoc) const {
bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) {
if (size == 0) {
- Grow(lineDocEnd + growSize);
+ Grow(linesInDoc + growSize);
}
// TODO: modify docLine members to mirror displayLine
int delta = 0;
@@ -191,7 +191,7 @@ bool ContractionState::GetExpanded(int lineDoc) const {
bool ContractionState::SetExpanded(int lineDoc, bool expanded) {
if (size == 0) {
- Grow(lineDoc + growSize);
+ Grow(linesInDoc + growSize);
}
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
if (lines[lineDoc].expanded != expanded) {
diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx
index c76dd3b07..0f5ca5614 100644
--- a/src/LexSQL.cxx
+++ b/src/LexSQL.cxx
@@ -114,8 +114,8 @@ static void ColouriseSQLDoc(unsigned int startPos, int length,
if (ch == '/' && chPrev == '*') {
if (((i > (styler.GetStartSegment() + 2)) || ((initStyle == SCE_C_COMMENT) &&
(styler.GetStartSegment() == startPos)))) {
- state = SCE_C_DEFAULT;
styler.ColourTo(i, state);
+ state = SCE_C_DEFAULT;
}
}
} else if (state == SCE_C_COMMENTLINE) {