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

Method getCurrentColumnCount

src/eepp/ui/uicodeeditor.cpp:5521–5532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5519}
5520
5521Int64 UICodeEditor::getCurrentColumnCount() const {
5522 Int64 count = 0;
5523 mDoc->safeLineOp(
5524 mDoc->getSelection().start().line(), [this, &count]( TextDocumentLine& line ) {
5525 const String& lineText = mDoc->line( mDoc->getSelection().start().line() ).getText();
5526 Int64 lineLen = lineText.size();
5527 Int64 sel = eemin( mDoc->getSelection().start().column(), lineLen );
5528 for ( Int64 i = 0; i < sel; i++ )
5529 count += lineText[i] == '\t' ? mTabWidth : 1;
5530 } );
5531 return count;
5532}
5533
5534bool UICodeEditor::getFindReplaceEnabled() const {
5535 return mFindReplaceEnabled;

Callers 1

updateDocInfoMethod · 0.80

Calls 7

eeminFunction · 0.85
safeLineOpMethod · 0.80
columnMethod · 0.80
startMethod · 0.45
getSelectionMethod · 0.45
getTextMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected