changeset 53837:3cc32cd9cf25

(hscroll_window_tree): Position cursor near to right margin in hscrolled window when jumping to end of line (rather than centering cursor).
author Kim F. Storm <storm@cua.dk>
date Fri, 06 Feb 2004 23:59:57 +0000
parents f83f4889c092
children 22cf96204003
files src/xdisp.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Fri Feb 06 23:52:36 2004 +0000
+++ b/src/xdisp.c	Fri Feb 06 23:59:57 2004 +0000
@@ -9562,7 +9562,10 @@
 
 	      /* Position cursor in window.  */
 	      if (!hscroll_relative_p && hscroll_step_abs == 0)
-		hscroll = max (0, it.current_x - text_area_width / 2)
+		hscroll = max (0, (it.current_x
+				   - (ITERATOR_AT_END_OF_LINE_P (&it)
+				      ? (text_area_width - 4 * FRAME_COLUMN_WIDTH (it.f))
+				      : (text_area_width / 2))))
 		    	  / FRAME_COLUMN_WIDTH (it.f);
 	      else if (w->cursor.x >= text_area_width - h_margin)
 		{