minor fixes

This commit is contained in:
Steven Hugg 2018-10-05 09:36:10 -04:00
parent aa9a829373
commit 398103c3b9
2 changed files with 4 additions and 1 deletions

View File

@ -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];

View File

@ -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)) {