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

Method onCursorRecordChanged

src/plugins/codeeditor/gui/tabwidget.cpp:402–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402void TabWidgetPrivate::onCursorRecordChanged(int pos)
403{
404 auto editor = qobject_cast<TextEditor *>(sender());
405 if (!editor)
406 return;
407
408 if (curPosRecord.fileName == editor->getFile() && curPosRecord.pos == pos)
409 return;
410
411 prePosRecord.append({ pos, editor->getFile() });
412 for (const auto &record : nextPosRecord) {
413 prePosRecord.removeOne(record);
414 }
415 nextPosRecord.clear();
416 if (prePosRecord.size() >= MAX_PRE_NEXT_TIMES)
417 prePosRecord.takeFirst();
418}
419
420void TabWidgetPrivate::handleDoRename(const newlsp::WorkspaceEdit &info)
421{

Callers

nothing calls this directly

Calls 4

getFileMethod · 0.45
appendMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected