aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog10
-rw-r--r--src/window.c25
2 files changed, 17 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 80aedce45f2..4e9cd28e026 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12001-02-19 Gerd Moellmann <gerd@gnu.org> 12001-02-19 Gerd Moellmann <gerd@gnu.org>
2 2
3 * window.c (Fmove_to_window_line): Undo last change.
4 (displayed_window_lines): Call line_bottom_y to determine
5 the line's bottom position.
6
7 * dispextern.h (line_bottom_y): Add prototype.
8
9 * xdisp.c (line_bottom_y): New function extracted from
10 pos_visible_p.
11 (pos_visible_p): Use it.
12
3 * keyboard.c (recursive_edit_1): Bind `inhibit-redisplay' and 13 * keyboard.c (recursive_edit_1): Bind `inhibit-redisplay' and
4 set redisplaying_p to 0 here instead of in Frecursive_edit. 14 set redisplaying_p to 0 here instead of in Frecursive_edit.
5 (Frecursive_edit): Don't bind `inhibit-redisplay' and don't 15 (Frecursive_edit): Don't bind `inhibit-redisplay' and don't
diff --git a/src/window.c b/src/window.c
index a84cd668c81..61c4d3c83b8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4495,25 +4495,18 @@ displayed_window_lines (w)
4495 SET_TEXT_POS_FROM_MARKER (start, w->start); 4495 SET_TEXT_POS_FROM_MARKER (start, w->start);
4496 start_display (&it, w, start); 4496 start_display (&it, w, start);
4497 move_it_vertically (&it, height); 4497 move_it_vertically (&it, height);
4498 4498 bottom_y = line_bottom_y (&it);
4499 if (old_buffer)
4500 set_buffer_internal (old_buffer);
4501
4502 bottom_y = it.current_y + it.max_ascent + it.max_descent;
4503
4504 if (bottom_y > it.current_y && bottom_y <= it.last_visible_y)
4505 /* Hit a line without a terminating newline. */
4506 it.vpos++;
4507 4499
4508 /* Add in empty lines at the bottom of the window. */ 4500 /* Add in empty lines at the bottom of the window. */
4509 if (bottom_y < height) 4501 if (bottom_y < height)
4510 { 4502 {
4511 struct frame *f = XFRAME (w->frame); 4503 int uy = CANON_Y_UNIT (it.f);
4512 int rest = height - bottom_y; 4504 it.vpos += (height - bottom_y + uy - 1) / uy;
4513 int lines = rest / CANON_Y_UNIT (f);
4514 it.vpos += lines;
4515 } 4505 }
4516 4506
4507 if (old_buffer)
4508 set_buffer_internal (old_buffer);
4509
4517 return it.vpos; 4510 return it.vpos;
4518} 4511}
4519 4512
@@ -4659,13 +4652,9 @@ zero means top of window, negative means relative to bottom of window.")
4659 XSETINT (arg, XINT (arg) + lines); 4652 XSETINT (arg, XINT (arg) + lines);
4660 } 4653 }
4661 4654
4662#if 0 /* I don't understand why this is done. Among other things, 4655 /* Skip past a partially visible first line. */
4663 it means that C-u 0 M-r moves to line 1, and C-u -1 M-r
4664 moves to the line below the window end. 2000-02-05, gerd */
4665 if (w->vscroll) 4656 if (w->vscroll)
4666 /* Skip past a partially visible first line. */
4667 XSETINT (arg, XINT (arg) + 1); 4657 XSETINT (arg, XINT (arg) + 1);
4668#endif
4669 4658
4670 return Fvertical_motion (arg, window); 4659 return Fvertical_motion (arg, window);
4671} 4660}