… | |
… | |
539 | #ifdef SCROLL_ON_HOMEEND_KEYS |
539 | #ifdef SCROLL_ON_HOMEEND_KEYS |
540 | if (IS_SCROLL_MOD) |
540 | if (IS_SCROLL_MOD) |
541 | { |
541 | { |
542 | if (keysym == XK_Home) |
542 | if (keysym == XK_Home) |
543 | { |
543 | { |
544 | scr_move_to (0, 1); |
544 | scr_changeview (top_row); |
545 | return; |
545 | return; |
546 | } |
546 | } |
547 | else if (keysym == XK_End) |
547 | else if (keysym == XK_End) |
548 | { |
548 | { |
549 | scr_move_to (1, 1); |
549 | scr_changeview (0); |
550 | return; |
550 | return; |
551 | } |
551 | } |
552 | } |
552 | } |
553 | #endif |
553 | #endif |
554 | } |
554 | } |
… | |
… | |
1077 | |
1077 | |
1078 | #ifdef SELECTION_SCROLLING |
1078 | #ifdef SELECTION_SCROLLING |
1079 | void |
1079 | void |
1080 | rxvt_term::sel_scroll_cb (ev::timer &w, int revents) |
1080 | rxvt_term::sel_scroll_cb (ev::timer &w, int revents) |
1081 | { |
1081 | { |
1082 | if (scr_page (scroll_selection_dir, scroll_selection_lines)) |
1082 | if (scr_page (scroll_selection_lines)) |
1083 | { |
1083 | { |
1084 | selection_extend (selection_save_x, selection_save_y, selection_save_state); |
1084 | selection_extend (selection_save_x, selection_save_y, selection_save_state); |
1085 | want_refresh = 1; |
1085 | want_refresh = 1; |
1086 | refresh_check (); |
1086 | refresh_check (); |
1087 | } |
1087 | } |
… | |
… | |
1092 | |
1092 | |
1093 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1093 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1094 | void |
1094 | void |
1095 | rxvt_term::slip_wheel_cb (ev::timer &w, int revents) |
1095 | rxvt_term::slip_wheel_cb (ev::timer &w, int revents) |
1096 | { |
1096 | { |
1097 | if (scr_changeview (view_start - mouse_slip_wheel_speed)) |
1097 | if (scr_page (mouse_slip_wheel_speed)) |
1098 | { |
1098 | { |
1099 | want_refresh = 1; |
1099 | want_refresh = 1; |
1100 | refresh_check (); |
1100 | refresh_check (); |
1101 | } |
1101 | } |
1102 | |
1102 | |
… | |
… | |
1638 | |
1638 | |
1639 | #ifdef SELECTION_SCROLLING |
1639 | #ifdef SELECTION_SCROLLING |
1640 | if (ev.xbutton.y < int_bwidth |
1640 | if (ev.xbutton.y < int_bwidth |
1641 | || Pixel2Row (ev.xbutton.y) > (nrow-1)) |
1641 | || Pixel2Row (ev.xbutton.y) > (nrow-1)) |
1642 | { |
1642 | { |
|
|
1643 | page_dirn scroll_selection_dir; |
1643 | int dist; |
1644 | int dist; |
1644 | |
1645 | |
1645 | /* don't clobber the current delay if we are |
1646 | /* don't clobber the current delay if we are |
1646 | * already in the middle of scrolling. |
1647 | * already in the middle of scrolling. |
1647 | */ |
1648 | */ |
… | |
… | |
1670 | scroll_selection_lines = Pixel2Height (dist) |
1671 | scroll_selection_lines = Pixel2Height (dist) |
1671 | / SELECTION_SCROLL_LINE_SPEEDUP |
1672 | / SELECTION_SCROLL_LINE_SPEEDUP |
1672 | + 1; |
1673 | + 1; |
1673 | min_it (scroll_selection_lines, |
1674 | min_it (scroll_selection_lines, |
1674 | SELECTION_SCROLL_MAX_LINES); |
1675 | SELECTION_SCROLL_MAX_LINES); |
|
|
1676 | scroll_selection_lines *= scroll_selection_dir; |
1675 | } |
1677 | } |
1676 | else |
1678 | else |
1677 | { |
1679 | { |
1678 | /* we are within the text window, so we |
1680 | /* we are within the text window, so we |
1679 | * shouldn't be scrolling |
1681 | * shouldn't be scrolling |
… | |
… | |
2211 | |
2213 | |
2212 | # ifdef MOUSE_SLIP_WHEELING |
2214 | # ifdef MOUSE_SLIP_WHEELING |
2213 | if (ev.state & ControlMask) |
2215 | if (ev.state & ControlMask) |
2214 | { |
2216 | { |
2215 | mouse_slip_wheel_speed += dirn; |
2217 | mouse_slip_wheel_speed += dirn; |
2216 | if (mouse_slip_wheel_speed < -nrow) mouse_slip_wheel_speed = -nrow; |
2218 | clamp_it (mouse_slip_wheel_speed, -nrow, nrow); |
2217 | if (mouse_slip_wheel_speed > +nrow) mouse_slip_wheel_speed = +nrow; |
|
|
2218 | |
2219 | |
2219 | if (!slip_wheel_ev.is_active ()) |
2220 | if (!slip_wheel_ev.is_active ()) |
2220 | slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); |
2221 | slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); |
2221 | } |
2222 | } |
2222 | else |
2223 | else |