set tab preview mode off in markTabUnsaved

This commit is contained in:
SPRINX0\prochazka
2024-11-25 08:31:24 +01:00
parent 090549ff91
commit ab7c2d7a31
3 changed files with 6 additions and 2 deletions

View File

@@ -23,7 +23,9 @@ export function changeTab(tabid, changeFunc) {
export function markTabUnsaved(tabid) {
const tab = getOpenedTabs().find(x => x.tabid == tabid);
if (tab.unsaved) return;
openedTabs.update(files => files.map(tab => (tab.tabid == tabid ? { ...tab, unsaved: true } : tab)));
openedTabs.update(files =>
files.map(tab => (tab.tabid == tabid ? { ...tab, unsaved: true, tabPreviewMode: false } : tab))
);
}
export function markTabSaved(tabid) {