From c8fe70f713e273e14fb998a663e787f320093fae Mon Sep 17 00:00:00 2001 From: RadAd Date: Mon, 27 May 2019 11:00:39 +1000 Subject: Dont scrollback in alternate mode --- RadTerminal.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'RadTerminal.cpp') diff --git a/RadTerminal.cpp b/RadTerminal.cpp index d435a96..319552c 100644 --- a/RadTerminal.cpp +++ b/RadTerminal.cpp @@ -465,16 +465,24 @@ int ActionPasteFromClipboard(HWND hWnd) int ActionScrollbackUp(HWND hWnd) { const RadTerminalData* const data = (RadTerminalData*) GetWindowLongPtr(hWnd, GWLP_USERDATA); - tsm_screen_sb_up(data->screen, 1); - InvalidateRect(hWnd, nullptr, TRUE); + const unsigned int flags = tsm_screen_get_flags(data->screen); + if (!(flags & TSM_SCREEN_ALTERNATE)) + { + tsm_screen_sb_up(data->screen, 1); + InvalidateRect(hWnd, nullptr, TRUE); + } return 0; } int ActionScrollbackDown(HWND hWnd) { const RadTerminalData* const data = (RadTerminalData*) GetWindowLongPtr(hWnd, GWLP_USERDATA); - tsm_screen_sb_down(data->screen, 1); - InvalidateRect(hWnd, nullptr, TRUE); + const unsigned int flags = tsm_screen_get_flags(data->screen); + if (!(flags & TSM_SCREEN_ALTERNATE)) + { + tsm_screen_sb_down(data->screen, 1); + InvalidateRect(hWnd, nullptr, TRUE); + } return 0; } -- cgit v1.2.3