CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
504 stars 74 forks source link

🐞 Erratic behavior of interline spacing #168

Closed richardtop closed 1 year ago

richardtop commented 1 year ago

Description

Interline spacing behavior is inconsistent and erratic, line spacing is not respected after resizing a window. Often, a new line inserted is displayed as having a larger interline spacing compared to the one that is required.

To Reproduce

  1. Create a file with some text, e.g.:

CalendarKit is a Swift calendar UI library for iOS and Mac Catalyst. It looks similar to the Apple Calendar app out-of-the-box, while allowing customization when needed. CalendarKit is composed of multiple modules which can be used together or independently.

(on a single line, no newline characters)

  1. Press "return" key and observe the interline spacing
  2. Type some text, e.g. "L"
  3. Observe that the interline spacing has increased
  4. Type "return" a few more times, type some text after either each line or at some point down...
  5. Observe the interline spacing, remember it's size
  6. Try to resize the window by dragging it's bottom right corner
  7. Observe that the interline spacing collapses to the correct size now and the text looks consistent

Expected Behavior

Interline spacing is consistent across the whole file, both, the new (added) lines and the old lines have the same interline spacing.

Version Information

CodeEdit: 0.0.3-alpha.30

Additional Context

No response

Screenshots

Bildschirm­foto 2023-03-19 um 05 45 19 Bildschirm­foto 2023-03-19 um 05 45 25 Bildschirm­foto 2023-03-19 um 05 58 58 Bildschirm­foto 2023-03-19 um 05 59 09
lukepistrol commented 1 year ago

Transferring this issue to CodeEditTextView

thecoolwinter commented 1 year ago

Looks like it's maybe related to #142. Is this still reproducible in the latest CodeEdit alpha?

thecoolwinter commented 1 year ago

Closing this issue due to no response, likely fixed with #142 but feel free to re-open if not the case.