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

Method getVisibleIndexPosition

src/eepp/ui/doc/documentview.cpp:72–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72TextPosition DocumentView::getVisibleIndexPosition( VisibleIndex visibleIndex ) const {
73 eeASSERT( mConfig.mode == LineWrapMode::NoWrap || !mVisibleLines.empty() );
74 if ( isOneToOne() || mVisibleLines.empty() )
75 return { static_cast<Int64>( visibleIndex ), 0 };
76 return mVisibleLines[eeclamp( static_cast<Int64>( visibleIndex ), 0ll,
77 eemax( static_cast<Int64>( mVisibleLines.size() ) - 1, 0ll ) )];
78}
79
80Float DocumentView::getLinePadding( Int64 docIdx ) const {
81 if ( isOneToOne() || mVisibleLinesOffset.empty() )

Callers 5

resolveScreenPositionMethod · 0.80
getDocumentLineRangeMethod · 0.80
getColFromXOffsetMethod · 0.80
drawMinimapMethod · 0.80

Calls 4

eeclampFunction · 0.85
eemaxFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected