MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / PositionAfterArea

Method PositionAfterArea

scintilla/src/Editor.cxx:6916–6927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6914}
6915
6916int Editor::PositionAfterArea ( PRectangle rcArea )
6917{
6918 // The start of the document line after the display line after the area
6919 // This often means that the line after a modification is restyled which helps
6920 // detect multiline comment additions and heals single line comments
6921 int lineAfter = topLine + ( rcArea.bottom - 1 ) / vs.lineHeight + 1;
6922 if ( lineAfter < cs.LinesDisplayed() ) {
6923 return pdoc->LineStart ( cs.DocFromDisplay ( lineAfter ) + 1 );
6924 } else {
6925 return pdoc->Length();
6926 }
6927}
6928
6929// Style to a position within the view. If this causes a change at end of last line then
6930// affects later lines so style all the viewed text.

Callers

nothing calls this directly

Calls 4

LinesDisplayedMethod · 0.80
DocFromDisplayMethod · 0.80
LineStartMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected