unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5718: scroll-margin in buffer with small line count.
@ 2010-03-14 17:26 Oleksandr Gavenko
  2016-08-11  4:11 ` Andrew Hyatt
  0 siblings, 1 reply; 31+ messages in thread
From: Oleksandr Gavenko @ 2010-03-14 17:26 UTC (permalink / raw)
  To: 5718

I have official Emacs 22.3 from FSF ftp server for Windows.

When set

(setq scroll-margin 4)

in buffer with window width 6 lines real margin value is 1
(so real line scrolling done when press <up> on second line
or when press <down> on fifth line).

Experiment show such dependence of real margin on line count:

lines      real-scroll-margin
3,4,5,6         1
7,8,9,10        2
11,12,13,14     3
 >15             4

I count from 3 as when try make less lines Emacs warn.

I think that whose modify scroll-margin want to see as many
as possible margin value up to its customization value.

This formula produce such values:

best-scroll-margin = min( (line_count - 1)/2,  scroll-margin)

So previous table changed to:

lines      best-scroll-margin
3,4             1
5,6             2
7,8             3
 >9              4

Also as you can see in proposal case
user switch start work from 9 lines in window, not 15!

Please implement described behaviour.

-- 
Best regards!







^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-02-03  2:40 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-14 17:26 bug#5718: scroll-margin in buffer with small line count Oleksandr Gavenko
2016-08-11  4:11 ` Andrew Hyatt
2016-08-11 12:03   ` npostavs
2016-08-11 13:05     ` Oleksandr Gavenko
2016-08-11 13:24       ` Noam Postavsky
2016-08-12  7:54         ` Oleksandr Gavenko
2016-08-11 15:28     ` Eli Zaretskii
2016-08-13 22:01       ` npostavs
2016-08-14  2:36         ` Eli Zaretskii
2016-09-11 20:58           ` npostavs
2016-09-12  6:19             ` martin rudalics
2016-09-14  2:23               ` npostavs
2016-09-14  5:30                 ` martin rudalics
2016-09-12 17:36             ` Eli Zaretskii
2016-09-14  2:40               ` npostavs
2016-09-14 17:26                 ` Eli Zaretskii
2017-01-03  0:48                   ` npostavs
2017-01-07  8:17                     ` Eli Zaretskii
2017-01-14  4:18                       ` npostavs
2017-01-14  7:58                         ` Eli Zaretskii
2017-01-15 21:43                           ` npostavs
2017-01-16 17:08                             ` Eli Zaretskii
2017-01-21 18:46                               ` npostavs
2017-01-21 19:17                                 ` Eli Zaretskii
2017-01-22 17:21                                   ` npostavs
2017-01-22 17:58                                     ` Eli Zaretskii
2017-01-29  0:57                                       ` npostavs
2017-01-30 15:29                                         ` Eli Zaretskii
2017-01-31  4:52                                           ` npostavs
2017-01-31 15:33                                             ` Eli Zaretskii
2017-02-03  2:40                                               ` npostavs

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).