MCPcopy Create free account
hub / github.com/KDE/kdevelop / setCursorPosition

Method setCursorPosition

kdevplatform/shell/textdocument.cpp:461–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461void TextDocument::setCursorPosition(const KTextEditor::Cursor &cursor)
462{
463 Q_D(TextDocument);
464
465 if (!cursor.isValid() || !d->document)
466 return;
467
468 KTextEditor::View *view = activeTextView();
469
470 // Rodda: Cursor must be accurate here, to the definition of accurate for KTextEditor::Cursor.
471 // ie, starting from 0,0
472
473 if (view)
474 selectAndReveal(view, {cursor, cursor});
475}
476
477KTextEditor::Range TextDocument::textSelection() const
478{

Callers 1

selectAndRevealFunction · 0.45

Calls 2

selectAndRevealFunction · 0.85
isValidMethod · 0.45

Tested by

no test coverage detected