aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/terminal/terminalwidget.cpp
diff options
context:
space:
mode:
authorMarcus Tillmanns <[email protected]>2024-03-18 10:40:07 +0100
committerMarcus Tillmanns <[email protected]>2024-03-18 10:03:02 +0000
commit3d8d85b5b9d670c678a63360839b9c386a0c5c8c (patch)
tree2979c0bc30ad5d88a26ea5b29e7d984ae7de5421 /src/plugins/terminal/terminalwidget.cpp
parent10858b1f6824b49d955073105ffb2319db83e5b7 (diff)
Terminal: Ignore "height = 0" resize events
ConPTY on windows will send "clear line" characters in response to resizing the PTY. During re-showing the terminal pane the widget receives a "height=0" resize event. We have to ignore this otherwise the conpty might try to clear the screen. Another issue was that we are calling resize on the pty even thought the process has ended and won't be able to respond to the clear attempty by the pty anymore. Fixes: QTCREATORBUG-30523 Change-Id: I24caeaffb31d255a0640952e2d35bda23fd16280 Reviewed-by: Cristian Adam <[email protected]>
Diffstat (limited to 'src/plugins/terminal/terminalwidget.cpp')
-rw-r--r--src/plugins/terminal/terminalwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp
index 2bd0fa403dd..756f1a11bee 100644
--- a/src/plugins/terminal/terminalwidget.cpp
+++ b/src/plugins/terminal/terminalwidget.cpp
@@ -336,7 +336,7 @@ qint64 TerminalWidget::writeToPty(const QByteArray &data)
void TerminalWidget::resizePty(QSize newSize)
{
- if (m_process && m_process->ptyData())
+ if (m_process && m_process->ptyData() && m_process->isRunning())
m_process->ptyData()->resize(newSize);
}