Skip to content

Commit

Permalink
fix: code Editor content is wrong when EditorTabs are changed (#160)
Browse files Browse the repository at this point in the history
* fix: update workbench color theme json

* fix: fix code Editor content is wrong when EditorTabs are changed
  • Loading branch information
mumiao authored May 31, 2021
1 parent e23a6b0 commit 2b05642
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/controller/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export class EditorController extends Controller implements IEditorController {

public updateCurrentValue = () => {
const { current } = this.editorService.getState();
const newValue = current?.tab?.data?.value;
const model = current?.editorInstance?.getModel();
const newValue = model.getValue();
current?.editorInstance?.executeEdits('update-value', [
{
range: model.getFullModelRange(),
Expand Down
11 changes: 5 additions & 6 deletions src/extensions/theme-defaults/themes/dark_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
"statusBarItem.remoteBackground": "#16825D",
"sidebarSectionHeader.background": "#0000",
"sidebarSectionHeader.border": "#ccc3",
"tabHeader.border": "#333",
"tabItem.background": "rgb(45, 45, 45)",
"tabItem.foreground": "rgba(255, 255, 255, 0.5)",
"tabItem.border": "rgb(37, 37, 38)",
"tabItem.activeBackground": "rgb(30, 30, 30)",
"tabItem.activeForeground": "rgb(255, 255, 255)",
"tab.border": "#333",
"tab.inactiveBackground": "rgb(45, 45, 45)",
"tab.inactiveForeground": "rgba(255, 255, 255, 0.5)",
"tab.activeBackground": "rgb(30, 30, 30)",
"tab.activeForeground": "rgb(255, 255, 255)",
"search.matchValueBackground": "rgba(234, 92, 0, 0.33)",
"actionBar.checkedBackground": "rgba(0, 127, 212, 0.4)"
},
Expand Down
10 changes: 4 additions & 6 deletions src/extensions/theme-defaults/themes/light_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
"statusBarItem.remoteBackground": "#16825D",
"sidebarSectionHeader.background": "#0000",
"sidebarSectionHeader.border": "#61616130",
"tabHeader.border": "#333",
"tabItem.background": "rgb(236, 236, 236)",
"tabItem.foreground": "rgba(51, 51, 51, 0.7)",
"tabItem.border": "rgb(243, 243, 243)",
"tabItem.activeBackground": "rgb(255, 255, 255)",
"tabItem.activeForeground": "rgb(51, 51, 51)"
"tab.border": "#333",
"tab.inactiveBackground": "rgb(236, 236, 236)",
"tab.inactiveForeground": "rgba(51, 51, 51, 0.7)",
"tab.activeForeground": "rgb(255, 255, 255)"
},
"semanticHighlighting": true
}

0 comments on commit 2b05642

Please sign in to comment.