如何防止Emacs滚动鼠标超过缓冲区的末尾?

时间:2016-10-15 14:26:30

标签: emacs vertical-scrolling

默认行为是Emacs不断滚动最后一行到帧的中心。当我使用鼠标滚动时,如何将最后一行保留在框架的底部?

1 个答案:

答案 0 :(得分:1)

  
(setq scroll-conservatively 101)

以下是*Help*生成的describe-variable窗口中的信息:

scroll-conservatively is a variable defined in `C source code'.
Its value is 101
Original value was 0

Documentation:
Scroll up to this many lines, to bring point back on screen.
If point moves off-screen, redisplay will scroll by up to
‘scroll-conservatively’ lines in order to bring point just barely
onto the screen again.  If that cannot be done, then redisplay
recenters point as usual.

If the value is greater than 100, redisplay will never recenter point,
but will always scroll just enough text to bring point into view, even
if you move far away.

A value of zero means always recenter point if it moves off screen.

You can customize this variable.