diff options
| author | Karoly Lorentey | 2005-07-05 22:12:55 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-07-05 22:12:55 +0000 |
| commit | 41be4f66fd33b17eba3e3ed4b8f8828c77f18517 (patch) | |
| tree | 23558632ba5eac56317f1df9fac514f439e7f82d /src/window.c | |
| parent | 2f98e6e37b5870a644a178d4d6998c6c7f1f68dd (diff) | |
| parent | 41700b79db6e52aee51d9d57c453b5f6fbd61e6e (diff) | |
| download | emacs-41be4f66fd33b17eba3e3ed4b8f8828c77f18517.tar.gz emacs-41be4f66fd33b17eba3e3ed4b8f8828c77f18517.zip | |
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
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c index df284420ddf..38d680fbc72 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4785,7 +4785,9 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 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) |
| @@ -4822,7 +4824,9 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 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. */ |
| @@ -4838,7 +4842,9 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 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) |
| @@ -4953,7 +4959,8 @@ window_scroll_line_based (window, n, whole, noerror) | |||
| 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); |
| @@ -6916,9 +6923,13 @@ If there is only one window, it is split regardless of this value. */); | |||
| 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", |