Sort $0 tab stops last instead of first for TextMate compatibility

This commit is contained in:
Nathan Sobo
2013-01-09 12:32:11 -07:00
parent e33f93b40c
commit 6c2607a5e0
2 changed files with 3 additions and 2 deletions

View File

@@ -35,8 +35,8 @@ describe "Snippets extension", ->
"tab stops":
prefix: "t2"
body: """
go here next:($1) and finally go here:($2)
go here first:($0)
go here next:($2) and finally go here:($0)
go here first:($1)
"""

View File

@@ -22,6 +22,7 @@ class Snippet
for segment in bodyTree
if segment.index?
{ index, content } = segment
index = Infinity if index == 0
start = [row, column]
extractTabStops(content)
tabStopsByIndex[index] = new Range(start, [row, column])