Skip to content

Commit

Permalink
Fix line number cutting off after a certain point
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Apr 9, 2023
1 parent 11a5188 commit 8f568fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/home/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ class _CodeFieldWidgetState extends ConsumerState<_CodeFieldWidget> {
child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: SizedBox(
height: fontSize * 3 + 1000,
// Line height * Number of lines + Extra space
height:
fontSize * 3 * _controller.text.split('\n').length +
1000,
child: CodeField(
// ! Add text matching
controller: _controller,
Expand Down

0 comments on commit 8f568fe

Please sign in to comment.