mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-20 05:29:35 +00:00
improved option for onlyShowTargetLineNumbers
This commit is contained in:
parent
9b1d09defe
commit
678c49f540
|
@ -313,12 +313,20 @@ public class ApplesoftBasicProgram extends BasicProgram
|
||||||
private String getBase (SourceLine line)
|
private String getBase (SourceLine line)
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
|
boolean isTarget =
|
||||||
|
gotoLines.contains (line.lineNumber) || gosubLines.contains (line.lineNumber);
|
||||||
|
|
||||||
if (!basicPreferences.showTargets)
|
if (!basicPreferences.showTargets)
|
||||||
|
{
|
||||||
|
if (!isTarget && basicPreferences.onlyShowTargetLineNumbers)
|
||||||
|
return " ";
|
||||||
return String.format (" %5d", line.lineNumber);
|
return String.format (" %5d", line.lineNumber);
|
||||||
|
}
|
||||||
|
|
||||||
String lineNumberText = String.format ("%5d", line.lineNumber);
|
String lineNumberText = String.format ("%5d", line.lineNumber);
|
||||||
SubLine subline = line.sublines.get (0);
|
SubLine subline = line.sublines.get (0);
|
||||||
String c1 = " ", c2 = " ";
|
String c1 = " ", c2 = " ";
|
||||||
|
|
||||||
if (subline.is (TOKEN_GOSUB))
|
if (subline.is (TOKEN_GOSUB))
|
||||||
c1 = "<<";
|
c1 = "<<";
|
||||||
if (subline.is (TOKEN_GOTO))
|
if (subline.is (TOKEN_GOTO))
|
||||||
|
@ -331,8 +339,11 @@ public class ApplesoftBasicProgram extends BasicProgram
|
||||||
c1 = "--";
|
c1 = "--";
|
||||||
if (!c1.equals (" ") && c2.equals (" "))
|
if (!c1.equals (" ") && c2.equals (" "))
|
||||||
c2 = "--";
|
c2 = "--";
|
||||||
if (basicPreferences.onlyShowTargetLineNumbers && !c2.startsWith (">"))
|
|
||||||
|
// if (basicPreferences.onlyShowTargetLineNumbers && !c2.startsWith (">"))
|
||||||
|
if (!isTarget && basicPreferences.onlyShowTargetLineNumbers)
|
||||||
lineNumberText = "";
|
lineNumberText = "";
|
||||||
|
|
||||||
return String.format ("%s%s %s", c1, c2, lineNumberText);
|
return String.format ("%s%s %s", c1, c2, lineNumberText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user