mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-21 07:05:58 +02:00
[185577] Put terminal in default state before reconnect
This commit is contained in:
parent
a94ca4263a
commit
12046f452c
2 changed files with 13 additions and 5 deletions
|
@ -238,6 +238,7 @@ public class TerminalControl implements ITerminalControlForText, ITerminalContro
|
||||||
Logger.log("entered."); //$NON-NLS-1$
|
Logger.log("entered."); //$NON-NLS-1$
|
||||||
if(fConnector==null)
|
if(fConnector==null)
|
||||||
return;
|
return;
|
||||||
|
fTerminalText.resetState();
|
||||||
fConnector.connect(this);
|
fConnector.connect(this);
|
||||||
// clean the error message
|
// clean the error message
|
||||||
setMsg(""); //$NON-NLS-1$
|
setMsg(""); //$NON-NLS-1$
|
||||||
|
|
|
@ -308,10 +308,7 @@ public class TerminalText implements ControlListener {
|
||||||
|
|
||||||
text.addControlListener(this);
|
text.addControlListener(this);
|
||||||
|
|
||||||
currentForegroundColor = text.getForeground();
|
resetState();
|
||||||
currentBackgroundColor = text.getBackground();
|
|
||||||
currentFontStyle = SWT.NORMAL;
|
|
||||||
reverseVideo = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1986,7 +1983,17 @@ public class TerminalText implements ControlListener {
|
||||||
|
|
||||||
cursorColumn -= columnsToMove;
|
cursorColumn -= columnsToMove;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Resets the state of the terminal text (foreground color, background color,
|
||||||
|
* font style and other internal state). It essentially makes it ready for new input.
|
||||||
|
*/
|
||||||
|
public void resetState() {
|
||||||
|
ansiState=ANSISTATE_INITIAL;
|
||||||
|
currentForegroundColor = text.getForeground();
|
||||||
|
currentBackgroundColor = text.getBackground();
|
||||||
|
currentFontStyle = SWT.NORMAL;
|
||||||
|
reverseVideo = false;
|
||||||
|
}
|
||||||
protected int getBufferLineLimit() {
|
protected int getBufferLineLimit() {
|
||||||
return fBufferLineLimit;
|
return fBufferLineLimit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue