fix horizontal scroll
Issue #5
new
Do it in the window under cursor, not in the currently active window.
Comments (2)
-
reporter -
reporter UPD:
C-u
and NOT switch to scrolled window.(defun horizontal-scroll-left () "Scroll left one step." (let ((step (if (zerop hscroll-step) nil hscroll-step))) (scroll-left step t))) (defun hscroll-left () "Scroll left one step." (interactive) (horizontal-scroll-left)) (defun horizontal-mscroll-left (event) "Scroll left one step according to the EVENT." (interactive (list last-input-event)) (with-current-buffer (window-buffer (if mouse-wheel-follow-mouse (prog1 (selected-window) (select-window (mwheel-event-window event))))) (horizontal-scroll-left))) (defun horizontal-scroll-right () "Scroll right one step." (let ((step (if (zerop hscroll-step) nil hscroll-step))) (scroll-right step t))) (defun hscroll-right () "Scroll right one step." (interactive) (horizontal-scroll-right)) (defun horizontal-mscroll-right (event) "Scroll right one step according to the EVENT." (interactive (list last-input-event)) (with-current-buffer (window-buffer (if mouse-wheel-follow-mouse (prog1 (selected-window) (select-window (mwheel-event-window event))))) (horizontal-scroll-right)))
- Log in to comment
Take
(window-buffer curwin)
and edge cases frommwheel-scroll
tohscroll-{left,right}
.