1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-28 23:49:20 +00:00

fixing disasm cursor jumping

This commit is contained in:
Steven Hugg 2019-09-16 19:04:14 -05:00
parent f31e2568f6
commit 3faae474ee
2 changed files with 9 additions and 9 deletions

View File

@ -183,7 +183,8 @@ TODO:
- compiler bug in chase
- "shared" in URL doesn't work, leave in URL? (also importURL)
- segments disappear in memory map when binary unchanged
- 6502
- KIL stops debugger
- TypeError: null is not an object (evaluating 'n.destination')
https://8bitworkshop.com/v3.4.1/javatari.js/release/javatari/javatari.js
(32:443651) Safari 12.1.2

View File

@ -463,8 +463,8 @@ export class DisassemblerView implements ProjectView {
this.disasmview.setValue(text);
if (moveCursor) {
this.disasmview.setCursor(selline, 0);
jumpToLine(this.disasmview, selline);
}
jumpToLine(this.disasmview, selline);
}
getCursorPC() : number {
@ -511,14 +511,13 @@ export class ListingView extends DisassemblerView implements ProjectView {
var asmtext = this.assemblyfile.text;
var disasmview = this.getDisasmView();
disasmview.setValue(asmtext);
var debugging = true; // TODO: platform.isDebugging && platform.isDebugging();
var findPC = debugging ? pc : -1;
if (findPC >= 0 && this.assemblyfile) {
var lineno = this.assemblyfile.findLineForOffset(findPC, 15);
if (lineno && moveCursor) {
if (pc >= 0 && this.assemblyfile) {
var lineno = this.assemblyfile.findLineForOffset(pc, 15);
if (lineno) {
// set cursor while debugging
if (debugging)
if (moveCursor) {
disasmview.setCursor(lineno-1, 0);
}
jumpToLine(disasmview, lineno-1);
}
}