Closed manateelazycat closed 1 year ago
外部终端有个特性可以很好的支持用户查看输出历史:
当前的状态是, 用户滚动到顶部查看日志后, 命令一旦输出, 屏幕就滚动到最底部, 用户没法查看终端输出历史
现在用 self.backend.screen.history.bottom.maxlen <= self.backend.screen.history.position 可以判断光标是否在可视区域。
self.backend.screen.history.bottom.maxlen <= self.backend.screen.history.position
结合这个条件, 只要在命令行输出的函数做个判断就可以解决这个 issue.
4e28101 中已经支持了这一特性,但是滚动的跨度有点大
很好用!
外部终端有个特性可以很好的支持用户查看输出历史:
当前的状态是, 用户滚动到顶部查看日志后, 命令一旦输出, 屏幕就滚动到最底部, 用户没法查看终端输出历史