Skip to content
Snippets Groups Projects
Commit 088ff23f authored by Adam Welc's avatar Adam Welc
Browse files

Removed redundant conditionals plus renamed ambiguously named variable.

parent 0d4a98ea
No related branches found
No related tags found
No related merge requests found
......@@ -71,9 +71,9 @@ public abstract class BrowserInteractNode extends RNode {
BrowserState browserState = RContext.getInstance().stateInstrumentation.getBrowserState();
String savedPrompt = ch.getPrompt();
ch.setPrompt(browserPrompt(RArguments.getDepth(frame)));
RFunction caller = RArguments.getFunction(frame);
RFunction callerFunction = RArguments.getFunction(frame);
// we may be at top level where there is not caller
boolean callerIsDebugged = caller == null ? false : DebugHandling.isDebugged(caller);
boolean callerIsDebugged = callerFunction == null ? false : DebugHandling.isDebugged(callerFunction);
int exitMode = NEXT;
try {
browserState.setInBrowser(true);
......@@ -96,16 +96,16 @@ public abstract class BrowserInteractNode extends RNode {
case "n":
exitMode = NEXT;
// don't enable debugging if at top level
if (!callerIsDebugged && caller != null) {
DebugHandling.enableDebug(caller, "", "", true, true);
if (!callerIsDebugged) {
DebugHandling.enableDebug(callerFunction, "", "", true, true);
}
browserState.setLastEmptyLineCommand("n");
break LW;
case "s":
exitMode = STEP;
// don't enable debugging if at top level
if (!callerIsDebugged & caller != null) {
DebugHandling.enableDebug(caller, "", "", true, true);
if (!callerIsDebugged) {
DebugHandling.enableDebug(callerFunction, "", "", true, true);
}
browserState.setLastEmptyLineCommand("s");
break LW;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment