Subject: bug#16475: enhancement request: remove vertical scroll bar automatically when not needed

From: Eli Zaretskii <[email-masked]>
Date: Thu, 26 Oct 2017 19:30:17 +0300

> Date:  Wed, 25 Oct 2017 15:25:40 -0700
> From:  Keith David Bershatsky <[email-masked]>
> Cc:  [email-masked]
> 
> Scroll bars are not immediately removed, however, when `window_contents_visible_p` is true and this-command is a keyboard stroke.

Most probably because some redisplay optimization bypasses your code.

> Any ideas on how to immediately remove scroll bars from the target window when `window_contents_visible_p` is true?  [I have chosen the end of `redisplay_window` to perform the test because window start/end *should be* accurate at that location of the code.]

Like I said: I think the way this works will cause annoying visual
effects, so I propose to call set-window-scroll-bars from keyboard.c,
before we enter redisplay.