Skip to content

Commit a95e4db

Browse files
committed
fix: remove the updateTab action
1 parent e09f07d commit a95e4db

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

stories/extensions/test/testPane.tsx

+29-29
Original file line numberDiff line numberDiff line change
@@ -89,35 +89,35 @@ export type GenericClassDecorator<T> = (target: T) => void;`,
8989
};
9090

9191
molecule.editor.onUpdateTab((newTab) => {
92-
const { current } = molecule.editor.getState();
93-
const tab = current?.tab!;
94-
molecule.editor.updateTab(
95-
{
96-
id: tab.id,
97-
data: {
98-
...tab.data,
99-
modified: true,
100-
},
101-
},
102-
current?.id || -1
103-
);
104-
// TODO editorService add onSaveEditor() event.
105-
current?.editorInstance.addCommand(
106-
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S,
107-
() => {
108-
// ctrl + s
109-
molecule.editor.updateTab(
110-
{
111-
id: tab.id,
112-
data: {
113-
...tab.data,
114-
modified: false,
115-
},
116-
},
117-
current?.id || -1
118-
);
119-
}
120-
);
92+
// const { current } = molecule.editor.getState();
93+
// const tab = current?.tab!;
94+
// molecule.editor.updateTab(
95+
// {
96+
// id: tab.id,
97+
// data: {
98+
// ...tab.data,
99+
// modified: true,
100+
// },
101+
// },
102+
// current?.id || -1
103+
// );
104+
// // TODO editorService add onSaveEditor() event.
105+
// current?.editorInstance.addCommand(
106+
// monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S,
107+
// () => {
108+
// // ctrl + s
109+
// molecule.editor.updateTab(
110+
// {
111+
// id: tab.id,
112+
// data: {
113+
// ...tab.data,
114+
// modified: false,
115+
// },
116+
// },
117+
// current?.id || -1
118+
// );
119+
// }
120+
// );
121121
});
122122
let notify;
123123
const addANotification = function () {

0 commit comments

Comments
 (0)