From 6519e7fb9a1aff944b3bf47ae7d8475cd75363b1 Mon Sep 17 00:00:00 2001 From: Fred Sauer Date: Thu, 19 Mar 2026 19:20:53 -0700 Subject: [PATCH 1/4] use highlight instead of currentPC to jump to error Click on compile error locations temporarily highlights the line instead of setting the currentPC marker --- src/ide/ui.ts | 2 +- src/ide/views/editors.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ide/ui.ts b/src/ide/ui.ts index 193da4ce..f4a5e7e4 100644 --- a/src/ide/ui.ts +++ b/src/ide/ui.ts @@ -870,7 +870,7 @@ function getErrorElement(err: WorkerError) { link.click((ev) => { var wnd = projectWindows.createOrShow(path); if (wnd instanceof SourceEditor) { - wnd.setCurrentLine(err, true); + wnd.navigateToLine(err.line); } }); } diff --git a/src/ide/views/editors.ts b/src/ide/views/editors.ts index 6e4e14fd..77feed70 100644 --- a/src/ide/views/editors.ts +++ b/src/ide/views/editors.ts @@ -341,6 +341,18 @@ export class SourceEditor implements ProjectView { }); } + navigateToLine(line: number) { + if (line < 1 || line > this.editor.state.doc.lines) return; + const targetLine = this.editor.state.doc.line(line); + this.editor.dispatch({ + selection: { anchor: targetLine.from }, + effects: [ + highlightLines.effect.of({ start: line, end: line }), + EditorView.scrollIntoView(targetLine.from, { y: "center" }), + ], + }); + } + getValue(): string { return this.editor.state.doc.toString(); } From 5c0090d37b434e440229dd39c2df1b33896d36d9 Mon Sep 17 00:00:00 2001 From: Fred Sauer Date: Thu, 19 Mar 2026 19:23:10 -0700 Subject: [PATCH 2/4] set compile error cursor: pointer --- css/ui.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/css/ui.css b/css/ui.css index bc5f9d0c..71e26905 100644 --- a/css/ui.css +++ b/css/ui.css @@ -159,6 +159,9 @@ div.is-busy-unused { #error_alert_msg { margin-right: 2em; } +#error_alert_msg a { + cursor: pointer; +} div.menu_div { position: absolute; width: 200px; From 63eeeff929c8c9f0d5272987b7ea85020e1c88da Mon Sep 17 00:00:00 2001 From: Fred Sauer Date: Thu, 19 Mar 2026 19:34:43 -0700 Subject: [PATCH 3/4] fixup navigateToLine --- src/ide/views/editors.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ide/views/editors.ts b/src/ide/views/editors.ts index 77feed70..01fb8c1b 100644 --- a/src/ide/views/editors.ts +++ b/src/ide/views/editors.ts @@ -351,6 +351,7 @@ export class SourceEditor implements ProjectView { EditorView.scrollIntoView(targetLine.from, { y: "center" }), ], }); + this.editor.focus(); } getValue(): string { From 771bf55bbe009e1557a0c99aea7b11f46670791a Mon Sep 17 00:00:00 2001 From: Fred Sauer Date: Thu, 19 Mar 2026 19:42:45 -0700 Subject: [PATCH 4/4] fix disappearing error markers Fix issue where creating an error in DASM source and then clicking the error message would cause the error marker to disappear. --- src/ide/windows.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ide/windows.ts b/src/ide/windows.ts index 096c5fb7..07a80037 100644 --- a/src/ide/windows.ts +++ b/src/ide/windows.ts @@ -71,7 +71,7 @@ export class ProjectWindows { this.refreshErrors(); wnd.setVisible && wnd.setVisible(true); this.id2showfn[id] && this.id2showfn[id](id, wnd); - } else { + } else if (moveCursor) { this.refresh(moveCursor); } this.activeid = id;