This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store snippet tab stops in their own marker layer that maintains history
The previous commit changed the behavior of tab in the last tab stop to jump to the end of the tab stop and eat the tab, whereas previously hitting tab in the last tab stop just fell back to the default behavior of tab. Previously, when we undid a snippet expansion, we didn't destroy its markers. Instead, we relied on the fact that hitting tab again would be treated as if it were in the last tab stop, since all the markers got scrunched together after the prefix following the undo. This would abort handling of the command and we would move on to dispatch `snippets:expand`. Now that we don't abort the command handling in the last tab stop, we need a better solution. Putting tab stop markers on their own layer and maintaining history causes these markers to automatically be destroyed when undoing. Now before working with any tab stop, we check that its marker is not destroyed.
- Loading branch information
Nathan Sobo
committed
Jan 8, 2018
1 parent
b031d78
commit 749a762
Showing
3 changed files
with
41 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters