comparison src/window.c @ 83331:efa9e4606e7e

Merged from miles@gnu.org--gnu-2005 (patch 83-87, 449-468) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-449 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-450 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-451 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-452 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-453 Update from CVS: lisp/subr.el (add-to-ordered-list): Doc fix. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-454 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-455 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-456 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-457 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-458 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-459 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-460 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-462 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-463 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-465 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-466 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-467 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-468 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-83 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-84 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-85 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-86 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-87 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-371
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 05 Jul 2005 22:12:55 +0000
parents bdcbdec78dd3 5ce023c9db0d
children 6c13700d1c13
comparison
equal deleted inserted replaced
83330:233c9974025b 83331:efa9e4606e7e
4783 if (n > 0) 4783 if (n > 0)
4784 { 4784 {
4785 /* We moved the window start towards ZV, so PT may be now 4785 /* We moved the window start towards ZV, so PT may be now
4786 in the scroll margin at the top. */ 4786 in the scroll margin at the top. */
4787 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); 4787 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
4788 if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin) 4788 if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin
4789 && (NILP (Vscroll_preserve_screen_position)
4790 || EQ (Vscroll_preserve_screen_position, Qt)))
4789 /* We found PT at a legitimate height. Leave it alone. */ 4791 /* We found PT at a legitimate height. Leave it alone. */
4790 ; 4792 ;
4791 else if (preserve_y >= 0) 4793 else if (preserve_y >= 0)
4792 { 4794 {
4793 /* If we have a header line, take account of it. 4795 /* If we have a header line, take account of it.
4820 bytepos = IT_BYTEPOS (it); 4822 bytepos = IT_BYTEPOS (it);
4821 4823
4822 /* We moved the window start towards BEGV, so PT may be now 4824 /* We moved the window start towards BEGV, so PT may be now
4823 in the scroll margin at the bottom. */ 4825 in the scroll margin at the bottom. */
4824 move_it_to (&it, PT, -1, 4826 move_it_to (&it, PT, -1,
4825 it.last_visible_y - this_scroll_margin - 1, -1, 4827 (it.last_visible_y - CURRENT_HEADER_LINE_HEIGHT (w)
4828 - this_scroll_margin - 1),
4829 -1,
4826 MOVE_TO_POS | MOVE_TO_Y); 4830 MOVE_TO_POS | MOVE_TO_Y);
4827 4831
4828 /* Save our position, in case it's correct. */ 4832 /* Save our position, in case it's correct. */
4829 charpos = IT_CHARPOS (it); 4833 charpos = IT_CHARPOS (it);
4830 bytepos = IT_BYTEPOS (it); 4834 bytepos = IT_BYTEPOS (it);
4836 { 4840 {
4837 move_it_by_lines (&it, 1, 1); 4841 move_it_by_lines (&it, 1, 1);
4838 partial_p = it.current_y > it.last_visible_y; 4842 partial_p = it.current_y > it.last_visible_y;
4839 } 4843 }
4840 4844
4841 if (charpos == PT && !partial_p) 4845 if (charpos == PT && !partial_p
4846 && (NILP (Vscroll_preserve_screen_position)
4847 || EQ (Vscroll_preserve_screen_position, Qt)))
4842 /* We found PT before we found the display margin, so PT is ok. */ 4848 /* We found PT before we found the display margin, so PT is ok. */
4843 ; 4849 ;
4844 else if (preserve_y >= 0) 4850 else if (preserve_y >= 0)
4845 { 4851 {
4846 SET_TEXT_POS_FROM_MARKER (start, w->start); 4852 SET_TEXT_POS_FROM_MARKER (start, w->start);
4951 XSETFASTINT (w->last_overlay_modified, 0); 4957 XSETFASTINT (w->last_overlay_modified, 0);
4952 /* Set force_start so that redisplay_window will run 4958 /* Set force_start so that redisplay_window will run
4953 the window-scroll-functions. */ 4959 the window-scroll-functions. */
4954 w->force_start = Qt; 4960 w->force_start = Qt;
4955 4961
4956 if (whole && !NILP (Vscroll_preserve_screen_position)) 4962 if (!NILP (Vscroll_preserve_screen_position)
4963 && (whole || !EQ (Vscroll_preserve_screen_position, Qt)))
4957 { 4964 {
4958 SET_PT_BOTH (pos, pos_byte); 4965 SET_PT_BOTH (pos, pos_byte);
4959 Fvertical_motion (make_number (original_vpos), window); 4966 Fvertical_motion (make_number (original_vpos), window);
4960 } 4967 }
4961 /* If we scrolled forward, put point enough lines down 4968 /* If we scrolled forward, put point enough lines down
6914 doc: /* *Delete any window less than this wide. */); 6921 doc: /* *Delete any window less than this wide. */);
6915 window_min_width = 10; 6922 window_min_width = 10;
6916 6923
6917 DEFVAR_LISP ("scroll-preserve-screen-position", 6924 DEFVAR_LISP ("scroll-preserve-screen-position",
6918 &Vscroll_preserve_screen_position, 6925 &Vscroll_preserve_screen_position,
6919 doc: /* *Non-nil means scroll commands move point to keep its screen line unchanged. 6926 doc: /* *Controls if scroll commands move point to keep its screen line unchanged.
6920 This is only when it is impossible to keep point fixed and still 6927 A value of nil means point does not keep its screen position except
6921 scroll as specified. */); 6928 at the scroll margin or window boundary respectively.
6929 A value of t means point keeps its screen position if the scroll
6930 command moved it vertically out of the window, e.g. when scrolling
6931 by full screens.
6932 Any other value means point always keeps its screen position. */);
6922 Vscroll_preserve_screen_position = Qnil; 6933 Vscroll_preserve_screen_position = Qnil;
6923 6934
6924 DEFVAR_LISP ("window-configuration-change-hook", 6935 DEFVAR_LISP ("window-configuration-change-hook",
6925 &Vwindow_configuration_change_hook, 6936 &Vwindow_configuration_change_hook,
6926 doc: /* Functions to call when window configuration changes. 6937 doc: /* Functions to call when window configuration changes.