MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / RemoveLine

Method RemoveLine

plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp:575–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575void TextEditor::RemoveLine(int aStart, int aEnd)
576{
577 assert(!mReadOnly);
578 assert(aEnd >= aStart);
579 assert(mLines.size() > (size_t)(aEnd - aStart));
580
581 ErrorMarkers etmp;
582 for (auto& i : mErrorMarkers)
583 {
584 ErrorMarkers::value_type e(i.first >= aStart ? i.first - 1 : i.first, i.second);
585 if (e.first >= aStart && e.first <= aEnd)
586 continue;
587 etmp.insert(e);
588 }
589 mErrorMarkers = std::move(etmp);
590
591 Breakpoints btmp;
592 for (auto i : mBreakpoints)
593 {
594 if (i >= aStart && i <= aEnd)
595 continue;
596 btmp.insert(i >= aStart ? i - 1 : i);
597 }
598 mBreakpoints = std::move(btmp);
599
600 mLines.erase(mLines.begin() + aStart, mLines.begin() + aEnd);
601 assert(!mLines.empty());
602
603 mTextChanged = true;
604}
605
606void TextEditor::RemoveLine(int aIndex)
607{

Callers

nothing calls this directly

Calls 5

insertMethod · 0.80
eraseMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected