From e5c4c8f64b96f5bbddce76278288dfacfb375794 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 20 Dec 2021 01:03:11 -0600 Subject: [PATCH] Rebased Added hostname to tab name Removed -tas arg from the rm command --- src/ScriptEditor/ui/ScriptEditorRoot.tsx | 20 +++++++++++++------- src/Terminal/commands/rm.ts | 10 +--------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index 5eebf6144..9e32b9134 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -197,6 +197,13 @@ export function Root(props: IProps): React.ReactElement { editorRef.current.getAction("editor.action.formatDocument").run(); } + // How to load function definition in monaco + // https://github.com/Microsoft/monaco-editor/issues/1415 + // https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html + // https://www.npmjs.com/package/@monaco-editor/react#development-playground + // https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages + // https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39 + // https://blog.checklyhq.com/customizing-monaco/ // Before the editor is mounted function beforeMount(monaco: any): void { if (symbolsLoaded) return; @@ -508,10 +515,10 @@ export function Root(props: IProps): React.ReactElement { PromptEvent.emit({ txt: 'Do you want to save changes to ' + closingScript.fileName + '?', resolve: (result: boolean) => { - if(result) { - // Save changes - closingScript.code = savedScriptCode; - saveScript(closingScript); + if (result) { + // Save changes + closingScript.code = savedScriptCode; + saveScript(closingScript); } } }) @@ -556,7 +563,6 @@ export function Root(props: IProps): React.ReactElement { maxWidth="1640px" display="flex" flexDirection="row" - //overflow="auto" alignItems="center" whiteSpace="nowrap" ref={provided.innerRef} @@ -582,7 +588,7 @@ export function Root(props: IProps): React.ReactElement { onClick={() => onTabClick(index)} style={{ background: currentScript?.fileName === openScripts[index].fileName ? Settings.theme.secondarydark : '' }} > - {fileName} + {hostname}:~/{fileName}