Skip to content

Conversation

@blazetill
Copy link

This pull request fixes this issue

Not sure about the performance, it's fast enough for my use case.

Otherwise it also

  • fixes deprecation warnings,
  • whitespaces and
  • adds a field key which allows to set the key for the text field

Justus-M and others added 8 commits August 5, 2023 16:09
- Add textInputAction and enableSuggestions parameters
- Add automatic completion feature
- Fix emoji and special character rendering
- Add smartDashesType support
- Fix iOS horizontal scroll issue
- Keep local fieldKey parameter
- Fix indentation for smartDashesType comment
- Fix TextField constructor formatting
When wrap=true, long lines create multiple visual rows but line numbers
only showed logical line count. Now TextPainter measures each line's
visual height and inserts blank placeholders to keep line numbers
synchronized with wrapped content.

- Calculate visual line count using TextPainter.layout()
- Insert empty line number placeholders for wrapped visual lines
- Recalculate on width changes to maintain alignment
- Handle non-numeric placeholders in LineNumberController
fix(code-field): align line numbers with wrapped text lines
Now the line wrapping and line numbers should be synced
Calculate the available width from a closer LayoutBuilder
@blazetill blazetill changed the title Add gap in line numbers when word wrap is on Add gap between line numbers when word wrap is on Sep 25, 2025
@BertrandBev
Copy link
Owner

Thank you for those good additions !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can I switch word wrap on and off in the code_field?

4 participants