MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / onCursorPositionChanged

Method onCursorPositionChanged

src/plugins/codeeditor/gui/texteditor.cpp:874–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872}
873
874void TextEditor::onCursorPositionChanged(int line, int index)
875{
876 Q_UNUSED(line)
877
878 d->delayCursorTimer.start();
879 editor.cursorPositionChanged(d->fileName, line, index);
880 int pos = positionFromLineIndex(line, index);
881
882 if (!d->contentsChanged && d->lastCursorNeedRecord) {
883 emit cursorRecordChanged(d->lastCursorPos);
884 d->lastCursorNeedRecord = false;
885 } else if (d->contentsChanged || d->postionChangedByGoto) {
886 d->lastCursorNeedRecord = true;
887 d->postionChangedByGoto = false;
888 }
889 d->lastCursorPos = pos;
890}
891
892void TextEditor::focusOutEvent(QFocusEvent *event)
893{

Callers

nothing calls this directly

Calls 2

cursorPositionChangedMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected