From: Keith David Bershatsky <esq@lawlist.com>
To: 28936@debbugs.gnu.org
Subject: bug#28936: enhancement request: remove vertical scroll bar automatically when not needed
Date: Tue, 24 Oct 2017 20:46:06 -0700 [thread overview]
Message-ID: <m21slrc2kh.wl%esq@lawlist.com> (raw)
In-Reply-To: <m260b73mvx.wl%esq@lawlist.com>
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
next prev parent reply other threads:[~2017-10-25 3:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-22 3:02 bug#28936: move_it_in_display_line_to returns MOVE_POS_MATCH_OR_ZV before ZV Keith David Bershatsky
2017-10-22 5:14 ` Keith David Bershatsky
2017-10-22 14:12 ` Eli Zaretskii
2017-10-22 14:10 ` Eli Zaretskii
2017-10-22 18:05 ` Keith David Bershatsky
2017-10-22 18:30 ` Eli Zaretskii
2017-10-22 19:53 ` Eli Zaretskii
2017-10-22 19:22 ` bug#28936: nRe: " Keith David Bershatsky
2017-10-22 19:41 ` Eli Zaretskii
2017-10-23 5:20 ` Keith David Bershatsky
2017-10-23 13:55 ` Eli Zaretskii
2017-10-25 3:46 ` Keith David Bershatsky [this message]
2017-10-25 5:30 ` bug#28936: enhancement request: remove vertical scroll bar automatically when not needed Keith David Bershatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m21slrc2kh.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=28936@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.