From d2290ba00b32fcc06a24cc2337de5b20e29401f1 Mon Sep 17 00:00:00 2001 From: sanchezcarlosjr <24639141+sanchezcarlosjr@users.noreply.github.com> Date: Sun, 19 Nov 2023 01:24:04 -0800 Subject: [PATCH] feat(ux): show some loading indication --- src/app/notebook/cellTypes/languages/Cpp.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/notebook/cellTypes/languages/Cpp.ts b/src/app/notebook/cellTypes/languages/Cpp.ts index 8a2ff94..ee99c36 100644 --- a/src/app/notebook/cellTypes/languages/Cpp.ts +++ b/src/app/notebook/cellTypes/languages/Cpp.ts @@ -1,5 +1,4 @@ import {Language} from "./language"; -import {Observable, shareReplay} from "rxjs"; import {Extension} from "@codemirror/state"; import {cpp} from "@codemirror/lang-cpp"; import {autocompletion, CompletionContext, CompletionResult} from "@codemirror/autocomplete" @@ -39,8 +38,8 @@ export class Cpp extends Language { hostWrite: (output: string) => this.write(output), hostRead: () => prompt() }); - this.clear(); - api.compileLinkRun(this.mostRecentCode).then(console.log).catch(console.error); + super.dispatchShellRun(); + api.compileLinkRun(this.mostRecentCode).then(console.log).catch(console.error).finally(() => super.stop()); return true; }