mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
[276929] Properly reset the prompt flag.
This commit is contained in:
parent
c99de759a9
commit
dc1fa0f4c0
1 changed files with 5 additions and 4 deletions
|
@ -228,6 +228,9 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
}
|
}
|
||||||
|
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
|
// Whenever we get a command that is completed, we know we must be in the primary prompt
|
||||||
|
fPrompt = 1;
|
||||||
|
|
||||||
ICommand<?> command = token.getCommand();
|
ICommand<?> command = token.getCommand();
|
||||||
if (token.getCommand() instanceof CLICommand<?> &&
|
if (token.getCommand() instanceof CLICommand<?> &&
|
||||||
!(command instanceof ProcessCLICommand || command instanceof ProcessMIInterpreterExecConsole))
|
!(command instanceof ProcessCLICommand || command instanceof ProcessMIInterpreterExecConsole))
|
||||||
|
@ -237,14 +240,12 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
}
|
}
|
||||||
|
|
||||||
void setPrompt(String line) {
|
void setPrompt(String line) {
|
||||||
fPrompt = 0;
|
fPrompt = 1;
|
||||||
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=109733
|
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=109733
|
||||||
if (line == null)
|
if (line == null)
|
||||||
return;
|
return;
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
if (line.equals(PRIMARY_PROMPT)) {
|
if (line.equals(SECONDARY_PROMPT)) {
|
||||||
fPrompt = 1;
|
|
||||||
} else if (line.equals(SECONDARY_PROMPT)) {
|
|
||||||
fPrompt = 2;
|
fPrompt = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue