diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 45424db474c..0f7e9ac9f96 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11002,7 +11002,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 11002 | aggressive = current_buffer->scroll_up_aggressively; | 11002 | aggressive = current_buffer->scroll_up_aggressively; |
| 11003 | height = WINDOW_BOX_TEXT_HEIGHT (w); | 11003 | height = WINDOW_BOX_TEXT_HEIGHT (w); |
| 11004 | if (NUMBERP (aggressive)) | 11004 | if (NUMBERP (aggressive)) |
| 11005 | amount_to_scroll = XFLOATINT (aggressive) * height; | 11005 | { |
| 11006 | double float_amount = XFLOATINT (aggressive) * height; | ||
| 11007 | amount_to_scroll = float_amount; | ||
| 11008 | if (amount_to_scroll == 0 && float_amount > 0) | ||
| 11009 | amount_to_scroll = 1; | ||
| 11010 | } | ||
| 11006 | } | 11011 | } |
| 11007 | 11012 | ||
| 11008 | if (amount_to_scroll <= 0) | 11013 | if (amount_to_scroll <= 0) |
| @@ -11060,7 +11065,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 11060 | aggressive = current_buffer->scroll_down_aggressively; | 11065 | aggressive = current_buffer->scroll_down_aggressively; |
| 11061 | height = WINDOW_BOX_TEXT_HEIGHT (w); | 11066 | height = WINDOW_BOX_TEXT_HEIGHT (w); |
| 11062 | if (NUMBERP (aggressive)) | 11067 | if (NUMBERP (aggressive)) |
| 11063 | amount_to_scroll = XFLOATINT (aggressive) * height; | 11068 | { |
| 11069 | double float_amount = XFLOATINT (aggressive) * height; | ||
| 11070 | amount_to_scroll = float_amount; | ||
| 11071 | if (amount_to_scroll == 0 && float_amount > 0) | ||
| 11072 | amount_to_scroll = 1; | ||
| 11073 | } | ||
| 11064 | } | 11074 | } |
| 11065 | 11075 | ||
| 11066 | if (amount_to_scroll <= 0) | 11076 | if (amount_to_scroll <= 0) |