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

Method FindBefore

scintilla/src/PositionCache.cxx:192–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192int LineLayout::FindBefore(XYPOSITION x, int lower, int upper) const {
193 do {
194 int middle = (upper + lower + 1) / 2; // Round high
195 XYPOSITION posMiddle = positions[middle];
196 if (x < posMiddle) {
197 upper = middle - 1;
198 } else {
199 lower = middle;
200 }
201 } while (lower < upper);
202 return lower;
203}
204
205int LineLayout::EndLineStyle() const {
206 return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0];

Callers 3

SPositionFromLocationMethod · 0.80
SPositionFromLineXMethod · 0.80
BreakFinderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected