MCPcopy Create free account
hub / github.com/cxasm/notepad-- / UpdatePreprocessorFoldLevel

Function UpdatePreprocessorFoldLevel

src/qscint/scintilla/lexers/LexOScript.cpp:416–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416static void UpdatePreprocessorFoldLevel(int &levelCurrent,
417 Sci_PositionU startPos, Accessor &styler) {
418 char s[7]; // Size of the longest possible keyword + null.
419 GetForwardWordLowered(startPos, styler, s, sizeof(s));
420
421 if (strcmp(s, "ifdef") == 0 ||
422 strcmp(s, "ifndef") == 0) {
423 levelCurrent++;
424 } else if (strcmp(s, "endif") == 0) {
425 levelCurrent--;
426 if (levelCurrent < SC_FOLDLEVELBASE) {
427 levelCurrent = SC_FOLDLEVELBASE;
428 }
429 }
430}
431
432static void UpdateKeywordFoldLevel(int &levelCurrent, Sci_PositionU lastStart,
433 Sci_PositionU currentPos, Accessor &styler) {

Callers 1

FoldOScriptDocFunction · 0.85

Calls 1

GetForwardWordLoweredFunction · 0.85

Tested by

no test coverage detected