diff --git a/css/ui.css b/css/ui.css index 79a7e242..3ea22d41 100644 --- a/css/ui.css +++ b/css/ui.css @@ -274,3 +274,9 @@ canvas.pixelated { .twitter-follow-button:hover { color:#99ffff; } +.dropdown-item-checked::before { + position: absolute; + left: .4rem; + content: '\2713'; + font-weight: 400; +} diff --git a/doc/notes.txt b/doc/notes.txt index 57d17b67..ee2c785e 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -46,7 +46,6 @@ TODO: - show tool-specific (readonly) include files - verilog debugging makes it slow - fix VCS mame -- checkmarks for active window - remove FPS and play controls when Verilog scope paused diff --git a/src/ui.ts b/src/ui.ts index a0c9eaa1..e9d0f3b6 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -120,8 +120,10 @@ function refreshWindowList() { ul.append(li); if (createfn) { projectWindows.setCreateFunc(id, createfn); - $(a).click(function() { + $(a).click(function(e) { projectWindows.createOrShow(id); + ul.find('a').removeClass("dropdown-item-checked"); + ul.find(e.target).addClass("dropdown-item-checked"); }); } } @@ -194,7 +196,7 @@ function loadProject(preset_id:string) { // we need this to build create functions for the editor (TODO?) refreshWindowList(); // show main file - projectWindows.createOrShow(preset_id); + projectWindows.createOrShow(preset_id); // TODO: add checkmark } }); } diff --git a/src/windows.ts b/src/windows.ts index eafd21ed..74f8aa84 100644 --- a/src/windows.ts +++ b/src/windows.ts @@ -14,6 +14,7 @@ export class ProjectWindows { id2window : {[id:string]:ProjectView} = {}; id2createfn : {[id:string]:WindowCreateFunction} = {}; id2div : {[id:string]:HTMLElement} = {}; + activeid : string; activewnd : ProjectView; activediv : HTMLElement; lasterrors : WorkerError[]; @@ -47,6 +48,7 @@ export class ProjectWindows { this.refresh(); this.refreshErrors(); } + this.activeid = id; return wnd; } @@ -80,6 +82,8 @@ export class ProjectWindows { getActive() : ProjectView { return this.activewnd; } + getActiveID() : string { return this.activeid; } + getCurrentText() : string { if (this.activewnd && this.activewnd.getValue) return this.activewnd.getValue(); diff --git a/src/worker/workermain.js b/src/worker/workermain.js index ac14c9d7..91c63909 100644 --- a/src/worker/workermain.js +++ b/src/worker/workermain.js @@ -1169,7 +1169,7 @@ function compileVerilator(step) { noInitialRun:true, print:print_fn, printErr:match_fn, - //TOTAL_MEMORY:64*1024*1024, + TOTAL_MEMORY:256*1024*1024, }); var topmod = detectTopModuleName(code); var FS = verilator_mod['FS']; diff --git a/test/cli/testworker.js b/test/cli/testworker.js index 03355d0f..64b4b261 100644 --- a/test/cli/testworker.js +++ b/test/cli/testworker.js @@ -196,7 +196,7 @@ describe('Worker', function() { assert.ok(fn); done(err, msg); }; - doBuild(msgs, done2, 253177, 0, 0); + doBuild(msgs, done2, 1996909, 0, 0); }); it('should NOT preprocess SDCC', function(done) { compile('sdcc', 'int x=0\n#bah\n', 'mw8080bw', done, 0, 0, 1);