貌似 updateTab 没有去更新非当前 tab 的数据是一个 bug。
临时解决方法:在 updateTab 调用后调用 model.setValue
import { editor, Uri } from '@dtinsight/molecule/esm/monaco';
const tab = molecule.editor.getTabById(tabId, 1) as any
tab.data = newData
molecule.editor.updateTab(tab, 1);
// 以上只能更新当前 tab 的内容
const model = editor.getModel(Uri.parse(tab.id)); // 获取 tab 对应的 model
if (model) {
model.setValue('test');
}
Originally posted by @mortalYoung in #878 (comment)
临时解决方法:在 updateTab 调用后调用
model.setValueOriginally posted by @mortalYoung in #878 (comment)