aboutsummaryrefslogtreecommitdiff
path: root/RadTerminal.cpp
diff options
context:
space:
mode:
authorRadAd <adamgates84+github@gmail.com>2019-05-27 11:00:39 +1000
committerRadAd <adamgates84+github@gmail.com>2019-05-27 11:00:39 +1000
commitc8fe70f713e273e14fb998a663e787f320093fae (patch)
tree5644ae9290ef6be95840040eaba69c9f8730b7d4 /RadTerminal.cpp
parentb32ca05cd422bc8faf3ce267d59b1421e8ca11ef (diff)
downloadRadTerminal-c8fe70f713e273e14fb998a663e787f320093fae.tar.gz
RadTerminal-c8fe70f713e273e14fb998a663e787f320093fae.zip
Dont scrollback in alternate mode
Diffstat (limited to 'RadTerminal.cpp')
-rw-r--r--RadTerminal.cpp16
1 files changed, 12 insertions, 4 deletions
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;
}