Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Undoing snippets leaks snippet tab stops at ends #261

Closed
@Ingramz

Description

@Ingramz

This is taken from #239

Consider these two snippets:

    prefix: "bug1"
    body: "$1expanded$0"
    prefix: "bug2"
    body: "$0expanded$1"

To reproduce the leakage, do:
Type bug1 -> hit tab to expand snippet -> undo -> hit tab to expand snippet again -> hit tab again because it didn't work the first time: undo did not delete the tab stop at $0 from the first time.

A more obvious version of this is the same, but with bug2:
Type bug2 -> hit tab to expand snippet -> undo -> hit tab to expand snippet again: cursor jumps to the beginning of the prefix.

Pinging @nathansobo @savetheclocktower due to possible relevance from #260 wanting to improve on undo/redo. I thought this should be looked into while at it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions