Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add editing interface #8

Merged
merged 55 commits into from
Apr 22, 2022
Merged

Add editing interface #8

merged 55 commits into from
Apr 22, 2022

Conversation

mjakeman
Copy link
Owner

@mjakeman mjakeman commented Apr 16, 2022

Enables the user to manipulate the document model

  • Adds new TextDocument object
  • Encapsulates editing functionality into TextEditor
  • Supports linear traversal over a tree structure
  • Simple reliable cursor support
  • Insertion, deletion, and replacement
  • A TextMark structure which represents a position within a document

TODO:

  • More robust movement
  • Use per-paragraph indexing
  • Return or split functionality
  • Fix crashes involving selections/replacement
  • Handle start/end iters in both directions
  • Generic way of updating/invalidating mark locations
  • Visually indicate selections Deferred until layout/style rework
  • Grab focus on click
  • Unit tests (Part of Unit Tests #4)
    • insert
    • delete
    • replace
    • movement
    • split
    • mark

@mjakeman
Copy link
Owner Author

Design doc for caret positions and indexing:

image

@mjakeman mjakeman marked this pull request as ready for review April 22, 2022 14:53
@mjakeman mjakeman enabled auto-merge April 22, 2022 15:16
@mjakeman mjakeman merged commit d1f2e91 into master Apr 22, 2022
@mjakeman mjakeman deleted the input branch April 22, 2022 15:19
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.

1 participant