From 398103c3b96f56b27a5d809227dd2ce64e3fea0a Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Fri, 5 Oct 2018 09:36:10 -0400 Subject: [PATCH] minor fixes --- src/platform/galaxian.ts | 2 +- src/views.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/galaxian.ts b/src/platform/galaxian.ts index e01af170..edffb41a 100644 --- a/src/platform/galaxian.ts +++ b/src/platform/galaxian.ts @@ -84,7 +84,7 @@ const _GalaxianPlatform = function(mainElement, options) { var sl2 = (sl + scroll) & 0xff; var vramofs = (sl2>>3)<<5; // offset in VRAM var yy = sl2 & 7; // y offset within tile - var tile = vram.mem[vramofs+xofs]; + var tile = vram.mem[vramofs+xofs]; // TODO: why undefined? var color0 = (attrib & 7) << 2; var addr = gfxBase+(tile<<3)+yy; var data1 = rom[addr]; diff --git a/src/views.ts b/src/views.ts index 0d73eb2a..d6c11a89 100644 --- a/src/views.ts +++ b/src/views.ts @@ -41,6 +41,8 @@ function getVisibleEditorLineHeight() : number{ ///// +const MAX_ERRORS = 200; + export class SourceEditor implements ProjectView { constructor(path:string, mode:string) { this.path = path; @@ -161,6 +163,7 @@ export class SourceEditor implements ProjectView { // TODO: move cursor to error line if offscreen? this.clearErrors(); var numLines = this.editor.lineCount(); + errors = errors.slice(0, MAX_ERRORS); for (var info of errors) { // only mark errors with this filename, or without any filename if (!info.path || this.path.endsWith(info.path)) {