[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c92fc7a 2/6: Don't count mode line for scroll-margi
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master c92fc7a 2/6: Don't count mode line for scroll-margin limit |
Date: |
Fri, 3 Feb 2017 02:38:32 +0000 (UTC) |
branch: master
commit c92fc7a2156a5939439b7236452d4dfcfc13cc89
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Don't count mode line for scroll-margin limit
* src/window.c (window_scroll_margin): Use window_box_height to avoid
counting header line, scrollbars for scroll-margin limit (Bug #5718).
---
src/window.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/window.c b/src/window.c
index 1c83d98..235c3c1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4800,10 +4800,8 @@ window_scroll_margin (struct window *window, enum
margin_unit unit)
if (scroll_margin > 0)
{
int frame_line_height = default_line_pixel_height (window);
- int window_total_lines
- = window->total_lines * WINDOW_FRAME_LINE_HEIGHT (window)
- / frame_line_height;
- int margin = min (scroll_margin, window_total_lines / 4);
+ int window_lines = window_box_height (window) / frame_line_height;
+ int margin = min (scroll_margin, window_lines / 4);
if (unit == MARGIN_IN_PIXELS)
return margin * frame_line_height;
else
- [Emacs-diffs] master updated (604724e -> ce88155), Noam Postavsky, 2017/02/02
- [Emacs-diffs] master c92fc7a 2/6: Don't count mode line for scroll-margin limit,
Noam Postavsky <=
- [Emacs-diffs] master da515a0 5/6: Add tests for scrolling, Noam Postavsky, 2017/02/02
- [Emacs-diffs] master d17e92d 1/6: Refactor uses of scroll_margin to a function, Noam Postavsky, 2017/02/02
- [Emacs-diffs] master b9be4c1 4/6: Fix scrolling with partial lines, Noam Postavsky, 2017/02/02
- [Emacs-diffs] master e27a91c 3/6: Make limit on scroll-margin variable, Noam Postavsky, 2017/02/02
- [Emacs-diffs] master ce88155 6/6: ; Merge: fixes and updates to scroll margin (Bug#5718), Noam Postavsky, 2017/02/02