Add shift + scroll for horizontal scrolling

Close #2682, close #5184
This commit is contained in:
Jon Bockhorst 2019-01-01 02:29:57 -06:00 committed by Don HO
parent eb8eb25799
commit dd8ae05429

View File

@ -397,6 +397,14 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
return TRUE; return TRUE;
} }
if (LOWORD(wParam) & MK_SHIFT) {
// move 3 columns at a time
::CallWindowProc(_scintillaDefaultProc, hwnd, WM_HSCROLL, ((short)HIWORD(wParam) < 0) ? SB_LINERIGHT : SB_LINELEFT, NULL);
::CallWindowProc(_scintillaDefaultProc, hwnd, WM_HSCROLL, ((short)HIWORD(wParam) < 0) ? SB_LINERIGHT : SB_LINELEFT, NULL);
::CallWindowProc(_scintillaDefaultProc, hwnd, WM_HSCROLL, ((short)HIWORD(wParam) < 0) ? SB_LINERIGHT : SB_LINELEFT, NULL);
return TRUE;
}
//Have to perform the scroll first, because the first/last line do not get updated untill after the scroll has been parsed //Have to perform the scroll first, because the first/last line do not get updated untill after the scroll has been parsed
LRESULT scrollResult = ::CallWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam); LRESULT scrollResult = ::CallWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam);
return scrollResult; return scrollResult;