[studio] Fix config to update when open file name changes

This commit is contained in:
Gary Talent 2025-01-26 01:01:48 -06:00
parent 046834c2b9
commit a24bf7ffb9

View File

@ -377,6 +377,11 @@ ox::Error StudioUI::handleMoveFile(ox::StringViewCR oldPath, ox::StringViewCR ne
for (auto &f : m_openFiles) { for (auto &f : m_openFiles) {
if (f == oldPath) { if (f == oldPath) {
f = newPath; f = newPath;
editConfig<StudioConfig>(keelCtx(m_sctx), [&](StudioConfig &cfg) {
auto p = find(cfg.openFiles.begin(), cfg.openFiles.end(), oldPath);
*p = newPath;
cfg.activeTabItemName = newPath;
});
break; break;
} }
} }