diff options
author | nyamatongwe <unknown> | 2001-08-07 08:31:56 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-08-07 08:31:56 +0000 |
commit | a9c537fc3bd9a675de1bb54c394c42a39bcf78f9 (patch) | |
tree | 7f319780c5acb4bfe8fec5d1a282ae10baf20313 /src/Editor.cxx | |
parent | 853feea7bd73ef8307ebd33e5bdb551485231688 (diff) | |
download | scintilla-mirror-a9c537fc3bd9a675de1bb54c394c42a39bcf78f9.tar.gz |
Ensured old code that does not know about outlining still gets visible
markers for subordinate headers as the top level header symbols are
substituted.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 5e31a165c..68089a5d9 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -666,6 +666,12 @@ void Editor::InvalidateCaret() { InvalidateRange(currentPos, currentPos + 1); } +int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { + if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) + return markerDefault; + return markerCheck; +} + void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (vs.fixedColumnWidth == 0) return ; @@ -730,7 +736,13 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { needWhiteClosure = true; } } - + + // Old code does not know about new markers needed to distinguish all cases + int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, + SC_MARKNUM_FOLDEROPEN); + int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, + SC_MARKNUM_FOLDER); + while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { // Decide which fold indicator should be displayed @@ -744,12 +756,12 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (levelNum == SC_FOLDLEVELBASE) marks |= 1 << SC_MARKNUM_FOLDEROPEN; else - marks |= 1 << SC_MARKNUM_FOLDEROPENMID; + marks |= 1 << folderOpenMid; } else { if (levelNum == SC_FOLDLEVELBASE) marks |= 1 << SC_MARKNUM_FOLDER; else - marks |= 1 << SC_MARKNUM_FOLDEREND; + marks |= 1 << folderEnd; } needWhiteClosure = false; } else if (level & SC_FOLDLEVELWHITEFLAG) { |