gpt4 book ai didi

emacs - 如何在 GNU Emacs 中关闭过度滚动?

转载 作者:行者123 更新时间:2023-12-01 06:40:39 26 4
gpt4 key购买 nike

当我在 GNU Emacs (24) 中打开的文件(缓冲区)的行数少于当前窗口(框架)中可以显示的行数时,我可以 - 默认情况下 - 使用滚动条向下滚动并使顶部的行向上消失( “过度滚动”)。

如何关闭此功能,以便在框架中显示整个缓冲区时无法滚动?

我可以修补 gtkutil.c in the Emacs sources但更优雅的解决方案会很好。

最佳答案

现在可以通过设置变量 scroll-bar-adjust-thumb-portion 来修改滚动条的行为。 (到 nil ,出于我的目的),这里是文档:

scroll-bar-adjust-thumb-portion is a variable defined in `C source code'.
Its value is nil
Original value was t

Documentation:
Adjust thumb for overscrolling for Gtk+ and MOTIF.
Non-nil means adjust the thumb in the scroll bar so it can be dragged downwards
even if the end of the buffer is shown (i.e. overscrolling).
Set to nil if you want the thumb to be at the bottom when the end of the buffer
is shown. Also, the thumb fills the whole scroll bar when the entire buffer
is visible. In this case you can not overscroll.

[...] version 24.4 of Emacs.

与此提交一起引入: r111506 .

关于emacs - 如何在 GNU Emacs 中关闭过度滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10775891/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com