GNU bug report logs - #16475
24.3.50; enhancement request: remove vertical scroll bar automatically when not needed

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 17 Jan 2014 04:43:01 UTC

Severity: wishlist

Found in version 24.3.50

Full log


Message #14 received at 16475 <at> debbugs.gnu.org (full text, mbox):

From: Keith David Bershatsky <esq <at> lawlist.com>
To: 16475 <at> debbugs.gnu.org
Subject: enhancement request: remove vertical scroll bar automatically when
 not needed
Date: Tue, 24 Oct 2017 22:27:07 -0700
[Message part 1 (text/plain, inline)]
Resending/forwarding message to the correct tracking number; i.e., it should have been 16475 instead of 28936.

;;;;;;;;;;;;;;;;;;;;;; FORWARDED MESSAGE ;;;;;;;;;;;;;;;;;;;;;;

[Message part 2 (message/rfc822, inline)]
From: Keith David Bershatsky <esq <at> lawlist.com>
To: 28936 <at> debbugs.gnu.org
Cc: Drew Adams <drew.adams <at> oracle.com>
Subject: enhancement request: remove vertical scroll bar automatically when not needed
Date: Tue, 24 Oct 2017 20:46:06 -0700
Here is a first draft with a simple test (modifying xdisp.c), which probably nukes more than just the selected window's scroll bars when removing them, but it may be sufficient to revive this enhancement request in the event anyone is interested.

 finish_scroll_bars:

   if ((WINDOW_HAS_VERTICAL_SCROLL_BAR (w) || WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w))
        && ZV - BEGV > BUF_Z (XBUFFER (w->contents)) - w->window_end_pos - marker_position (w->start))
    {
      if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
	/* Set the thumb's position and size.  */
	set_vertical_scroll_bar (w);

      if (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w))
	/* Set the thumb's position and size.  */
	set_horizontal_scroll_bar (w);

      /* Note that we actually used the scroll bar attached to this
	 window, so it shouldn't be deleted at the end of redisplay.  */
      if (FRAME_TERMINAL (f)->redeem_scroll_bar_hook)
        (*FRAME_TERMINAL (f)->redeem_scroll_bar_hook) (w);
    }
    else
      {
        (*FRAME_TERMINAL (f)->condemn_scroll_bars_hook) (f);
        (*FRAME_TERMINAL (f)->judge_scroll_bars_hook) (f);
      }


Keith

This bug report was last modified 7 years and 231 days ago.

Previous Next


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