MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / storeEditorViewDetails

Method storeEditorViewDetails

src/SessionManager.cpp:380–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380void SessionManager::storeEditorViewDetails(ScintillaNext *editor, QSettings &settings)
381{
382 settings.setValue("FirstVisibleLine", static_cast<int>(editor->firstVisibleLine() + 1)); // Keep it 1-based in the settings just for human-readability
383 settings.setValue("CurrentPosition", static_cast<int>(editor->currentPos()));
384
385 BookMarkDecorator *decorator = editor->findChild<BookMarkDecorator*>(QString(), Qt::FindDirectChildrenOnly);
386 QList<int> bookMarkedLines = decorator->bookMarkedLines();
387 if (bookMarkedLines.length() > 0)
388 settings.setValue("BookMarks", QListToQVariantList(bookMarkedLines));
389}
390
391void SessionManager::loadEditorViewDetails(ScintillaNext *editor, QSettings &settings)
392{

Callers

nothing calls this directly

Calls 3

QListToQVariantListFunction · 0.85
bookMarkedLinesMethod · 0.80
lengthMethod · 0.80

Tested by

no test coverage detected