From 36d873d78def899a75396ff8fc59e5ecad79dad2 Mon Sep 17 00:00:00 2001 From: stevesmiles <53028092+stevesmiles@users.noreply.github.com> Date: Thu, 18 Jul 2019 15:12:34 -0400 Subject: [PATCH] Update ScintillaWin.cxx --- scintilla/win32/ScintillaWin.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index 1d54f2d72..0a3437136 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -1447,6 +1447,15 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam // Either SCROLL or ZOOM. We handle the wheel steppings calculation wheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam); + + // Hold RIGHT MOUSE BUTTON and SCROLL to cycle through UNDO history + if (wParam & MK_RBUTTON) { + if (wheelDelta >= 0) + Redo(); + else + Undo(); + } + if (std::abs(wheelDelta) >= WHEEL_DELTA && linesPerScroll > 0) { Sci::Line linesToScroll = linesPerScroll; if (linesPerScroll == WHEEL_PAGESCROLL)