aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKaroly Lorentey2006-03-12 04:51:49 +0000
committerKaroly Lorentey2006-03-12 04:51:49 +0000
commita6b6d0863c1b96e14ba3a2d1b9c941fbbcc8adf2 (patch)
treeab087c9b03ec98c1648cb02b4ee49096a1052e44 /src/window.c
parent33780b9521e3a416283b46dcd7e3ebb84bbffd67 (diff)
parent8cf1c5a44266bbd0f9919e854deee1d7361facd1 (diff)
downloademacs-a6b6d0863c1b96e14ba3a2d1b9c941fbbcc8adf2.tar.gz
emacs-a6b6d0863c1b96e14ba3a2d1b9c941fbbcc8adf2.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-144 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-145 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-146 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-147 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-148 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-149 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-150 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-151 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-152 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-56 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-57 Copy/update icons from Gnus trunk git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-530
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c
index bc9a956994a..23a4eb98e4b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -219,7 +219,7 @@ int window_deletion_count;
219 219
220/* Used by the function window_scroll_pixel_based */ 220/* Used by the function window_scroll_pixel_based */
221 221
222static int preserve_y; 222static int window_scroll_pixel_based_preserve_y;
223 223
224#if 0 /* This isn't used anywhere. */ 224#if 0 /* This isn't used anywhere. */
225/* Nonzero means we can split a frame even if it is "unsplittable". */ 225/* Nonzero means we can split a frame even if it is "unsplittable". */
@@ -4797,17 +4797,17 @@ window_scroll_pixel_based (window, n, whole, noerror)
4797 calls to scroll-up or scroll-down. This avoids the 4797 calls to scroll-up or scroll-down. This avoids the
4798 possibility of point becoming "stuck" on a tall line when 4798 possibility of point becoming "stuck" on a tall line when
4799 scrolling by one line. */ 4799 scrolling by one line. */
4800 if (preserve_y < 0 4800 if (window_scroll_pixel_based_preserve_y < 0
4801 || (current_kboard->Vlast_command != Qscroll_up 4801 || (current_kboard->Vlast_command != Qscroll_up
4802 && current_kboard->Vlast_command != Qscroll_down)) 4802 && current_kboard->Vlast_command != Qscroll_down))
4803 { 4803 {
4804 start_display (&it, w, start); 4804 start_display (&it, w, start);
4805 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); 4805 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
4806 preserve_y = it.current_y; 4806 window_scroll_pixel_based_preserve_y = it.current_y;
4807 } 4807 }
4808 } 4808 }
4809 else 4809 else
4810 preserve_y = -1; 4810 window_scroll_pixel_based_preserve_y = -1;
4811 4811
4812 /* Move iterator it from start the specified distance forward or 4812 /* Move iterator it from start the specified distance forward or
4813 backward. The result is the new window start. */ 4813 backward. The result is the new window start. */
@@ -4937,12 +4937,13 @@ window_scroll_pixel_based (window, n, whole, noerror)
4937 || EQ (Vscroll_preserve_screen_position, Qt))) 4937 || EQ (Vscroll_preserve_screen_position, Qt)))
4938 /* We found PT at a legitimate height. Leave it alone. */ 4938 /* We found PT at a legitimate height. Leave it alone. */
4939 ; 4939 ;
4940 else if (preserve_y >= 0) 4940 else if (window_scroll_pixel_based_preserve_y >= 0)
4941 { 4941 {
4942 /* If we have a header line, take account of it. 4942 /* If we have a header line, take account of it.
4943 This is necessary because we set it.current_y to 0, above. */ 4943 This is necessary because we set it.current_y to 0, above. */
4944 move_it_to (&it, -1, -1, 4944 move_it_to (&it, -1, -1,
4945 preserve_y - (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ), 4945 window_scroll_pixel_based_preserve_y
4946 - (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ),
4946 -1, MOVE_TO_Y); 4947 -1, MOVE_TO_Y);
4947 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 4948 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
4948 } 4949 }
@@ -4963,7 +4964,8 @@ window_scroll_pixel_based (window, n, whole, noerror)
4963 int charpos, bytepos; 4964 int charpos, bytepos;
4964 int partial_p; 4965 int partial_p;
4965 4966
4966 /* Save our position, for the preserve_y case. */ 4967 /* Save our position, for the
4968 window_scroll_pixel_based_preserve_y case. */
4967 charpos = IT_CHARPOS (it); 4969 charpos = IT_CHARPOS (it);
4968 bytepos = IT_BYTEPOS (it); 4970 bytepos = IT_BYTEPOS (it);
4969 4971
@@ -4993,14 +4995,15 @@ window_scroll_pixel_based (window, n, whole, noerror)
4993 || EQ (Vscroll_preserve_screen_position, Qt))) 4995 || EQ (Vscroll_preserve_screen_position, Qt)))
4994 /* We found PT before we found the display margin, so PT is ok. */ 4996 /* We found PT before we found the display margin, so PT is ok. */
4995 ; 4997 ;
4996 else if (preserve_y >= 0) 4998 else if (window_scroll_pixel_based_preserve_y >= 0)
4997 { 4999 {
4998 SET_TEXT_POS_FROM_MARKER (start, w->start); 5000 SET_TEXT_POS_FROM_MARKER (start, w->start);
4999 start_display (&it, w, start); 5001 start_display (&it, w, start);
5000 /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT 5002 /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT
5001 here because we called start_display again and did not 5003 here because we called start_display again and did not
5002 alter it.current_y this time. */ 5004 alter it.current_y this time. */
5003 move_it_to (&it, -1, -1, preserve_y, -1, MOVE_TO_Y); 5005 move_it_to (&it, -1, -1, window_scroll_pixel_based_preserve_y, -1,
5006 MOVE_TO_Y);
5004 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 5007 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
5005 } 5008 }
5006 else 5009 else
@@ -7027,7 +7030,7 @@ syms_of_window ()
7027 minibuf_selected_window = Qnil; 7030 minibuf_selected_window = Qnil;
7028 staticpro (&minibuf_selected_window); 7031 staticpro (&minibuf_selected_window);
7029 7032
7030 preserve_y = -1; 7033 window_scroll_pixel_based_preserve_y = -1;
7031 7034
7032 DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, 7035 DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function,
7033 doc: /* Non-nil means call as function to display a help buffer. 7036 doc: /* Non-nil means call as function to display a help buffer.