CIDER REPL展示结果时出现了多余的滚动问题

3
CIDER REPL如何进行配置,使其仅在需要显示结果时才滚动?
默认情况下,CIDER REPL(0.18.0)在显示结果时总是将点滚动到窗口底部,即使有足够的空间也是如此。

REPL-demo

我觉得这很不顺畅。为了防止“跳跃”,我被迫在窗口底部输入。理想情况下,在这个例子中不应该出现滚动条。(当结果超过点下方的空间时,点应该只向下滚动到底部。)


1
顺便提一下,我已经更新了手册,提到了这个链接http://www.cider.mx/en/latest/using_the_repl/#auto-scrolling-the-repl-on-output - Bozhidar Batsov
1个回答

2

看起来这是由定制变量cider-repl-scroll-on-output控制的:

(defcustom cider-repl-scroll-on-output t
  "Controls whether the REPL buffer auto-scrolls on new output.

When set to t (the default), if the REPL buffer contains more lines than the
size of the window, the buffer is automatically re-centered upon completion
of evaluating an expression, so that the bottom line of output is on the
bottom line of the window.

If this is set to nil, no re-centering takes place."
  :type 'boolean
  :group 'cider-repl
  :package-version '(cider . "0.11.0"))

尝试将默认值t更改为nil

没错,这就是正确的方式。 - Bozhidar Batsov

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接