GNU bug report logs - #27008
26.0.50; auto-hscroll-mode and scroll-left

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Sun, 21 May 2017 14:11:02 UTC

Severity: minor

Found in version 26.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 27008 <at> debbugs.gnu.org
Subject: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left
Date: Tue, 30 May 2017 17:56:07 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: 27008 <at> debbugs.gnu.org
> Date: Sun, 21 May 2017 22:12:27 +0200
> 
> Why can't the other lines be displayed with hscroll set to
> w->min_hscroll, as they are with auto-hscroll-mode set to t?

Thanks, I've tried to implement this idea in the attached.  I won't
have enough time to test it, though, so please run with this applied
for a few days and see if there are any adverse effects.  If not, I
will push this.

diff --git a/src/xdisp.c b/src/xdisp.c
index ddb26b8..898eb6b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2890,8 +2890,19 @@ init_iterator (struct it *it, struct window *w,
     }
   else
     {
+      /* When hscrolling only the current line, don't apply the
+	 hscroll here, it will be applied by display_line when it gets
+	 to laying out the line showing point.  However, if the
+	 window's min_hscroll is positive, the user specified a lower
+	 bound for automatic hscrolling, so they expect the
+	 non-current lines to obey that hscroll amount.  */
       if (hscrolling_current_line_p (w))
-	it->first_visible_x = 0;
+	{
+	  if (w->min_hscroll > 0)
+	    it->first_visible_x = w->min_hscroll;
+	  else
+	    it->first_visible_x = 0;
+	}
       else
 	it->first_visible_x =
 	  window_hscroll_limited (w, it->f) * FRAME_COLUMN_WIDTH (it->f);




This bug report was last modified 8 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.