From: Kim F. Storm Date: Sat, 7 Feb 2004 00:00:13 +0000 (+0000) Subject: (hscroll_window_tree): Position cursor near to right margin in hscrolled X-Git-Tag: ttn-vms-21-2-B4~7728 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec110e9e90a1ccbb8217f1ce7909e7faf734e32f;p=emacs.git (hscroll_window_tree): Position cursor near to right margin in hscrolled window when jumping to end of line (rather than centering cursor). --- diff --git a/src/ChangeLog b/src/ChangeLog index 15457e9abff..ad219254ddb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2004-02-07 Kim F. Storm + * xdisp.c (hscroll_window_tree): Position cursor near to right + margin in hscrolled window when jumping to end of line (rather + than centering cursor). + * process.c (wait_reading_process_input): Don't do adaptive read buffering if waiting for a specific process. diff --git a/src/xdisp.c b/src/xdisp.c index 3241822e7b4..5186a8641c3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9562,7 +9562,10 @@ hscroll_window_tree (window) /* 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) {