MCPcopy Create free account
hub / github.com/SpartanJ/eepp / sanitizePosition

Method sanitizePosition

src/eepp/ui/doc/textdocument.cpp:3045–3051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3043}
3044
3045TextPosition TextDocument::sanitizePosition( const TextPosition& position ) const {
3046 auto lineCount = linesCount();
3047 Int64 line = eeclamp<Int64>( position.line(), 0UL, lineCount ? lineCount - 1 : 0 );
3048 Int64 col =
3049 eeclamp<Int64>( position.column(), 0UL, eemax<Int64>( 0, getLineLength( line ) - 1 ) );
3050 return { line, col };
3051}
3052
3053const TextDocument::IndentType& TextDocument::getIndentType() const {
3054 return mIndentType;

Callers 2

checkMatchingBracketsMethod · 0.80
getColFromXOffsetMethod · 0.80

Calls 1

columnMethod · 0.80

Tested by

no test coverage detected