Skip to content

Commit 2b05642

Browse files
authored
fix: code Editor content is wrong when EditorTabs are changed (#160)
* fix: update workbench color theme json * fix: fix code Editor content is wrong when EditorTabs are changed
1 parent e23a6b0 commit 2b05642

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

src/controller/editor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ export class EditorController extends Controller implements IEditorController {
107107

108108
public updateCurrentValue = () => {
109109
const { current } = this.editorService.getState();
110-
const newValue = current?.tab?.data?.value;
111110
const model = current?.editorInstance?.getModel();
111+
const newValue = model.getValue();
112112
current?.editorInstance?.executeEdits('update-value', [
113113
{
114114
range: model.getFullModelRange(),

src/extensions/theme-defaults/themes/dark_defaults.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121
"statusBarItem.remoteBackground": "#16825D",
2222
"sidebarSectionHeader.background": "#0000",
2323
"sidebarSectionHeader.border": "#ccc3",
24-
"tabHeader.border": "#333",
25-
"tabItem.background": "rgb(45, 45, 45)",
26-
"tabItem.foreground": "rgba(255, 255, 255, 0.5)",
27-
"tabItem.border": "rgb(37, 37, 38)",
28-
"tabItem.activeBackground": "rgb(30, 30, 30)",
29-
"tabItem.activeForeground": "rgb(255, 255, 255)",
24+
"tab.border": "#333",
25+
"tab.inactiveBackground": "rgb(45, 45, 45)",
26+
"tab.inactiveForeground": "rgba(255, 255, 255, 0.5)",
27+
"tab.activeBackground": "rgb(30, 30, 30)",
28+
"tab.activeForeground": "rgb(255, 255, 255)",
3029
"search.matchValueBackground": "rgba(234, 92, 0, 0.33)",
3130
"actionBar.checkedBackground": "rgba(0, 127, 212, 0.4)"
3231
},

src/extensions/theme-defaults/themes/light_defaults.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020
"statusBarItem.remoteBackground": "#16825D",
2121
"sidebarSectionHeader.background": "#0000",
2222
"sidebarSectionHeader.border": "#61616130",
23-
"tabHeader.border": "#333",
24-
"tabItem.background": "rgb(236, 236, 236)",
25-
"tabItem.foreground": "rgba(51, 51, 51, 0.7)",
26-
"tabItem.border": "rgb(243, 243, 243)",
27-
"tabItem.activeBackground": "rgb(255, 255, 255)",
28-
"tabItem.activeForeground": "rgb(51, 51, 51)"
23+
"tab.border": "#333",
24+
"tab.inactiveBackground": "rgb(236, 236, 236)",
25+
"tab.inactiveForeground": "rgba(51, 51, 51, 0.7)",
26+
"tab.activeForeground": "rgb(255, 255, 255)"
2927
},
3028
"semanticHighlighting": true
3129
}

0 commit comments

Comments
 (0)