MCPcopy Create free account
hub / github.com/NPP-JSONViewer/JSON-Viewer / GetTitleFileName

Method GetTitleFileName

src/NppJsonViewer/JsonViewDlg.cpp:588–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588auto JsonViewDlg::GetTitleFileName() const -> std::wstring
589{
590 auto currFile = m_pEditor->GetCurrentFileName();
591 if (currFile.length() >= FILENAME_LEN_IN_TITLE)
592 {
593 // If the filename is too long, truncate it and add "..."
594 currFile = currFile.substr(0, FILENAME_LEN_IN_TITLE - 4) + L"...";
595 }
596
597 return currFile;
598}
599
600void JsonViewDlg::PrepareButtons()
601{

Callers

nothing calls this directly

Calls 1

GetCurrentFileNameMethod · 0.80

Tested by

no test coverage detected