mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +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$
|
||||
if(fConnector==null)
|
||||
return;
|
||||
fTerminalText.resetState();
|
||||
fConnector.connect(this);
|
||||
// clean the error message
|
||||
setMsg(""); //$NON-NLS-1$
|
||||
|
|
|
@ -308,10 +308,7 @@ public class TerminalText implements ControlListener {
|
|||
|
||||
text.addControlListener(this);
|
||||
|
||||
currentForegroundColor = text.getForeground();
|
||||
currentBackgroundColor = text.getBackground();
|
||||
currentFontStyle = SWT.NORMAL;
|
||||
reverseVideo = false;
|
||||
resetState();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1986,7 +1983,17 @@ public class TerminalText implements ControlListener {
|
|||
|
||||
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() {
|
||||
return fBufferLineLimit;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue