Terminal: Fix "altscreen" handling

When "altscreen" is enabled ( e.g. when starting nano ), the terminal
switches into an alternate mode without scrollback buffer.

This was not correctly handled where the scrollback buffer would stay
active.

Change-Id: I443d26383d9cd908befcd24a837ecf84c0c1e849
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-03-06 18:16:28 +01:00
parent 9b4e0c62fd
commit b95c0d247d
2 changed files with 17 additions and 10 deletions

View File

@@ -278,6 +278,8 @@ void TerminalWidget::setupSurface()
configBlinkTimer();
});
connect(m_surface.get(), &Internal::TerminalSurface::altscreenChanged, this, [this] {
updateScrollBars();
updateViewport();
setSelection(std::nullopt);
});
connect(m_surface.get(), &Internal::TerminalSurface::unscroll, this, [this] {