[studio] Fix config to update when open file name changes
This commit is contained in:
parent
046834c2b9
commit
a24bf7ffb9
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user