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)