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

From: martin rudalics <[email-masked]>
Date: Fri, 27 Oct 2017 10:25:54 +0200

>> Obviously, an equivalent of ‘set-window-scroll-bars’ would have to be
 >> used here.
 >
 > I agree, but then the right place to call this is not from redisplay,
 > but from keyboard.c, before it calls read_char (which calls
 > redisplay).  set-window-scroll-bars triggers a redisplay cycle, so
 > calling it from (the end of) redisplay is not very wise, IMO.

It's ecologically questionable in any case: After every change affecting
the buffer (insertion/deletion, overlays, visibility) we'd have to check
whether its text still fits into its window(s) and then either add or
remove the scroll bar(s).  And note that we may scroll lines out of view
(and thus implicitly should show a vertical scroll bar) even when the
text would entirely fit into its window.

martin