Skip to content

Editor:replaceLines/makeModifier don't handle replacing everything with nil properly. #25

@Possseidon

Description

@Possseidon

The editor assumes that there is always at least one line of (potentially empty) text. Otherwise there would be no place to put the cursor.

However, while implementing Editor:deleteLine(), I noticed that it is very easy to accidentally do just that and I ended up with some odd checks over there. This should probably be handled in makeModifier instead to make it impossible to begin with.

  • Add better "nil the entire thing" handling to makeModifier
  • Get rid of the (then redundant) workaround in Editor:deleteLine()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions