Merge pull request #7924 from furo321/keep-scroll-during-selection

Keep console scrolling position during text selection
This commit is contained in:
Dennis Felsing 2024-02-05 12:16:34 +00:00 committed by GitHub
commit 8214e26132
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1126,7 +1126,7 @@ void CGameConsole::OnRender()
pConsole->UpdateSearch(); pConsole->UpdateSearch();
// keep scroll position when new entries are printed. // keep scroll position when new entries are printed.
if(pConsole->m_BacklogCurLine != 0) if(pConsole->m_BacklogCurLine != 0 || pConsole->m_HasSelection)
{ {
pConsole->m_BacklogCurLine += pConsole->m_NewLineCounter; pConsole->m_BacklogCurLine += pConsole->m_NewLineCounter;
pConsole->m_BacklogLastActiveLine += pConsole->m_NewLineCounter; pConsole->m_BacklogLastActiveLine += pConsole->m_NewLineCounter;