diff options
| author | Joakim Verona | 2013-07-14 11:04:49 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-07-14 11:04:49 +0200 |
| commit | 0bb9bb0841d89fff09820a57369df4cb01b16b43 (patch) | |
| tree | 832bf9fa8415eef0ce464d22b3ee1300cfa90bb1 /src/window.c | |
| parent | 3718127221fbbc31f8ebd027ab7c95403dbe9118 (diff) | |
| parent | 3af1c8684ed6e48fbc21481d129e9aa164752c6e (diff) | |
| download | emacs-0bb9bb0841d89fff09820a57369df4cb01b16b43.tar.gz emacs-0bb9bb0841d89fff09820a57369df4cb01b16b43.zip | |
Merge branch 'trunk' into xwidget
Conflicts:
src/xdisp.c
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c index f02aa1d89a0..5c5d2b8e138 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4374,6 +4374,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4374 | int vscrolled = 0; | 4374 | int vscrolled = 0; |
| 4375 | int x, y, rtop, rbot, rowh, vpos; | 4375 | int x, y, rtop, rbot, rowh, vpos; |
| 4376 | void *itdata = NULL; | 4376 | void *itdata = NULL; |
| 4377 | int window_total_lines; | ||
| 4378 | int frame_line_height = default_line_pixel_height (w); | ||
| 4377 | 4379 | ||
| 4378 | SET_TEXT_POS_FROM_MARKER (start, w->start); | 4380 | SET_TEXT_POS_FROM_MARKER (start, w->start); |
| 4379 | /* Scrolling a minibuffer window via scroll bar when the echo area | 4381 | /* Scrolling a minibuffer window via scroll bar when the echo area |
| @@ -4417,7 +4419,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4417 | if (rtop || rbot) /* partially visible */ | 4419 | if (rtop || rbot) /* partially visible */ |
| 4418 | { | 4420 | { |
| 4419 | int px; | 4421 | int px; |
| 4420 | int dy = WINDOW_FRAME_LINE_HEIGHT (w); | 4422 | int dy = frame_line_height; |
| 4421 | if (whole) | 4423 | if (whole) |
| 4422 | dy = max ((window_box_height (w) | 4424 | dy = max ((window_box_height (w) |
| 4423 | - next_screen_context_lines * dy), | 4425 | - next_screen_context_lines * dy), |
| @@ -4503,7 +4505,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4503 | if (whole) | 4505 | if (whole) |
| 4504 | { | 4506 | { |
| 4505 | ptrdiff_t start_pos = IT_CHARPOS (it); | 4507 | ptrdiff_t start_pos = IT_CHARPOS (it); |
| 4506 | int dy = WINDOW_FRAME_LINE_HEIGHT (w); | 4508 | int dy = frame_line_height; |
| 4507 | dy = max ((window_box_height (w) | 4509 | dy = max ((window_box_height (w) |
| 4508 | - next_screen_context_lines * dy), | 4510 | - next_screen_context_lines * dy), |
| 4509 | dy) * n; | 4511 | dy) * n; |
| @@ -4620,10 +4622,12 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4620 | /* Move PT out of scroll margins. | 4622 | /* Move PT out of scroll margins. |
| 4621 | This code wants current_y to be zero at the window start position | 4623 | This code wants current_y to be zero at the window start position |
| 4622 | even if there is a header line. */ | 4624 | even if there is a header line. */ |
| 4625 | window_total_lines | ||
| 4626 | = w->total_lines * WINDOW_FRAME_LINE_HEIGHT (w) / frame_line_height; | ||
| 4623 | this_scroll_margin = max (0, scroll_margin); | 4627 | this_scroll_margin = max (0, scroll_margin); |
| 4624 | this_scroll_margin | 4628 | this_scroll_margin |
| 4625 | = min (this_scroll_margin, w->total_lines / 4); | 4629 | = min (this_scroll_margin, window_total_lines / 4); |
| 4626 | this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); | 4630 | this_scroll_margin *= frame_line_height; |
| 4627 | 4631 | ||
| 4628 | if (n > 0) | 4632 | if (n > 0) |
| 4629 | { | 4633 | { |