Tie up loose ends

- Ensure that customTheme is redefined whenever the options modal
is closed, regardless of saved or not
- Reset the pending value for the theme editor whenever modal is clsoed
This commit is contained in:
nickofolas
2022-01-29 23:44:31 -06:00
parent 0d700bd252
commit e800886d42
2 changed files with 10 additions and 4 deletions

View File

@@ -894,7 +894,10 @@ export function Root(props: IProps): React.ReactElement {
</Box>
<OptionsModal
open={optionsOpen}
onClose={() => setOptionsOpen(false)}
onClose={() => {
monacoRef.current?.editor.defineTheme("customTheme", makeTheme(Settings.EditorTheme));
setOptionsOpen(false);
}}
options={{
theme: Settings.MonacoTheme,
insertSpaces: Settings.MonacoInsertSpaces,