Disable terminal auto resize and reflow on mobile
This commit is contained in:
parent
f3a4749053
commit
43e7dc61f7
@ -135,7 +135,7 @@ class _TerminalPageState extends ConsumerState<TerminalPage>
|
||||
_QuickTerminalKey(keyId: 'symbol_dollar', label: r'$', input: r'$'),
|
||||
];
|
||||
|
||||
final Terminal terminal = Terminal(maxLines: 1000);
|
||||
final Terminal terminal = Terminal(maxLines: 1000, reflowEnabled: false);
|
||||
final TerminalInteractionController controller =
|
||||
TerminalInteractionController();
|
||||
final xterm_ui.TerminalController _terminalViewController =
|
||||
@ -721,6 +721,7 @@ class _TerminalPageState extends ConsumerState<TerminalPage>
|
||||
controller: _terminalViewController,
|
||||
focusNode: _terminalFocusNode,
|
||||
autofocus: false,
|
||||
autoResize: false,
|
||||
keyboardType: TextInputType.multiline,
|
||||
deleteDetection: true,
|
||||
readOnly: _inputMode == _TerminalInputMode.read,
|
||||
|
||||
@ -72,6 +72,15 @@ void main() {
|
||||
expect(terminalView.deleteDetection, isTrue);
|
||||
});
|
||||
|
||||
testWidgets('terminal view disables auto resize and text reflow', (tester) async {
|
||||
await _pumpTerminalPage(tester);
|
||||
|
||||
final terminalView = tester.widget<TerminalView>(find.byType(TerminalView));
|
||||
|
||||
expect(terminalView.autoResize, isFalse);
|
||||
expect(terminalView.terminal.reflowEnabled, isFalse);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'soft keyboard newline is sent as terminal enter after edit mode is selected',
|
||||
(tester) async {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user