Problem
TerminalView calls _scrollToBottom() after every input event (_onInsert, _handleKeyEvent, _onAction, _onKeyboardShow). This jumps the scroll position to maxScrollExtent unconditionally.
When embedding TerminalView in a layout where the viewport is smaller than the terminal (e.g. keeping the PTY dimensions stable while the on-screen keyboard is open, using autoResize: false and an outer ScrollView), this causes a visible flicker: the terminal jumps to the bottom of the scrollback buffer for one frame before the parent can correct the position.
There is no way to disable this behavior without forking the package. The scroll controller is shared (passed via scrollController parameter), but _scrollToBottom() bypasses it by accessing the ScrollPosition directly through _scrollableKey.
Use case
Android terminal app that keeps PTY dimensions stable when the soft keyboard opens by using autoResize: false and manually sizing the terminal widget. The built-in _scrollToBottom() fights external scroll positioning and causes flicker.
Problem
TerminalViewcalls_scrollToBottom()after every input event (_onInsert,_handleKeyEvent,_onAction,_onKeyboardShow). This jumps the scroll position tomaxScrollExtentunconditionally.When embedding
TerminalViewin a layout where the viewport is smaller than the terminal (e.g. keeping the PTY dimensions stable while the on-screen keyboard is open, usingautoResize: falseand an outerScrollView), this causes a visible flicker: the terminal jumps to the bottom of the scrollback buffer for one frame before the parent can correct the position.There is no way to disable this behavior without forking the package. The scroll controller is shared (passed via
scrollControllerparameter), but_scrollToBottom()bypasses it by accessing theScrollPositiondirectly through_scrollableKey.Use case
Android terminal app that keeps PTY dimensions stable when the soft keyboard opens by using
autoResize: falseand manually sizing the terminal widget. The built-in_scrollToBottom()fights external scroll positioning and causes flicker.