清理:移除未使用的 openFiles IPC、优化 setModified 避免每次按键重建标签 DOM
This commit is contained in:
@@ -297,7 +297,9 @@
|
||||
const tab = getActiveTab();
|
||||
if (tab) {
|
||||
tab.isModified = modified;
|
||||
renderTabBar();
|
||||
// Toggle class directly instead of rebuilding entire tab bar
|
||||
const tabEl = tabList.querySelector(`.tab-item[data-tab-id="${tab.id}"]`);
|
||||
if (tabEl) tabEl.classList.toggle('modified', modified);
|
||||
}
|
||||
updateTitle();
|
||||
}
|
||||
@@ -672,8 +674,7 @@
|
||||
if (tab) {
|
||||
tab.isModified = true;
|
||||
tab.content = editor.value;
|
||||
renderTabBar();
|
||||
updateTitle();
|
||||
setModified(true);
|
||||
}
|
||||
scheduleUpdate();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user