From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#16475: enhancement request: remove vertical scroll bar automatically when not needed Date: Tue, 24 Oct 2017 22:27:07 -0700 Message-ID: References: <8bfbddfb-237e-47b1-aed7-b28fc97d1f92@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Tue_Oct_24_22:27:06_2017-1" X-Trace: blaine.gmane.org 1508909294 31348 195.159.176.226 (25 Oct 2017 05:28:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2017 05:28:14 +0000 (UTC) To: 16475@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 25 07:28:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7EEa-0007LN-7Q for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 07:28:09 +0200 Original-Received: from localhost ([::1]:46585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EEf-0007QU-Qh for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 01:28:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EEZ-0007QO-EL for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 01:28:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7EEU-0000S2-GB for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 01:28:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7EEU-0000Rm-96 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 01:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7EEU-000842-1O for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 01:28:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <8bfbddfb-237e-47b1-aed7-b28fc97d1f92@default> Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 05:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16475 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16475-submit@debbugs.gnu.org id=B16475.150890923330933 (code B ref 16475); Wed, 25 Oct 2017 05:28:01 +0000 Original-Received: (at 16475) by debbugs.gnu.org; 25 Oct 2017 05:27:13 +0000 Original-Received: from localhost ([127.0.0.1]:60579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7EDf-00082p-R9 for submit@debbugs.gnu.org; Wed, 25 Oct 2017 01:27:12 -0400 Original-Received: from gateway36.websitewelcome.com ([192.185.187.5]:31870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7EDd-00082g-KF for 16475@debbugs.gnu.org; Wed, 25 Oct 2017 01:27:10 -0400 Original-Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway36.websitewelcome.com (Postfix) with ESMTP id A2406400D26CF for <16475@debbugs.gnu.org>; Wed, 25 Oct 2017 00:27:08 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id 7EDceS4PT5b6T7EDceiUNK; Wed, 25 Oct 2017 00:27:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=PfgvqxbOxU1J8oGJ+7AUbup3IlgUtci11Nm1MuGrPwk=; b=ggZk5LMCTaGguQ3GclvCKr2tOd havk1xpJ//ho1etZosxtJ6aviqtSY83fH+udTMiPBlO01UAD29+Vf1+xi1kprhaiTHLKO+YsXIw93 dgueGnZJH2s0t0DNOTwwwZlsMbmzcnY8MFFhITRyp6zn1va7EQgYCHDABcrh9V331ZB9vbcqy2vCw ePJ2fmtdy1CrhZ/KaXx4fuWpxcq2Wgii3Mi/FVCqk3PK7QHpCdSE6YaAeIZfLgj8ca5jv4hg6uoOS Ncd5u6s/uwAB/MTm06Pp4QMVjQtZbPHlsDLXBSPU8HVL1vVUBJfMBgZmwiiUjOMVtQJotq8a2V7hL jlyWATcA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:57512 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1e7EDb-00161R-T2 for 16475@debbugs.gnu.org; Wed, 25 Oct 2017 00:27:07 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Exim-ID: 1e7EDb-00161R-T2 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private) [45.48.239.195]:57512 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138946 Archived-At: --Multipart_Tue_Oct_24_22:27:06_2017-1 Content-Type: text/plain; charset=US-ASCII Resending/forwarding message to the correct tracking number; i.e., it should have been 16475 instead of 28936. ;;;;;;;;;;;;;;;;;;;;;; FORWARDED MESSAGE ;;;;;;;;;;;;;;;;;;;;;; --Multipart_Tue_Oct_24_22:27:06_2017-1 Content-Type: message/rfc822 Date: Tue, 24 Oct 2017 20:46:06 -0700 Message-ID: From: Keith David Bershatsky To: 28936@debbugs.gnu.org Cc: Drew Adams Subject: enhancement request: remove vertical scroll bar automatically when not needed MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 --Multipart_Tue_Oct_24_22:27:06_2017-1--