Skip to content

Fix editor#240

Merged
osnr merged 10 commits intomainfrom
fix-editor
Dec 26, 2025
Merged

Fix editor#240
osnr merged 10 commits intomainfrom
fix-editor

Conversation

@smj-edison
Copy link
Copy Markdown
Collaborator

Refactor editor to fix state issues:

  • Use consistent naming (editor instead of view, font options instead of text settings, editor buffer instead of view text)
  • Split viewport dimensions into viewport position and viewport size
  • Make viewport size reactive instead of being Held
  • Remove ctrl + t (ctrl + r already does the same thing)
  • Remove -keep 12ms to avoid locking up
  • Make editor number line work at both small and large sizes
  • Separate margin into top/right/bottom/left
  • Keep at least two characters on the left when moving the cursor left

Modify font rendering:

  • Refactor character position logic
  • Separate anchor into block anchor and line anchor

 * Use consistent naming (editor instead of view, font options instead of text settings, editor buffer instead of view text)
 * Split viewport dimensions into viewport position and viewport size
 * Make viewport size reactive instead of being Held
 * Remove `ctrl + t` (`ctrl + r` already does the same thing)
 * `-keep` editor cursor for 12ms
 * Make editor number line work at both small and large sizes
 * Separate margin into top/right/bottom/left
 * Keep at least two characters on the left when moving the cursor left
Comment thread builtin-programs/draw/text.folk Outdated
set anchor [list 1.0 0 1 0]
} elseif {$anchor == "left"} {
set anchor [list 0 0.5]
set anchor [list 0 0.5 0 5]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 0.5 here?

@osnr
Copy link
Copy Markdown
Collaborator

osnr commented Dec 26, 2025

The key bug we're trying to fix here is where the scroll viewport is weirdly small on editor reboot (due to some race in the old way we were doing state)

@osnr osnr merged commit 1fa581a into main Dec 26, 2025
@osnr osnr deleted the fix-editor branch December 27, 2025 05:18
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.

2 participants