SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

Syntax: Fix testcase scope completion #302

Closed deathaxe closed 4 years ago

deathaxe commented 4 years ago

This commit fixes an issue which causes wrong selectors to be suggested, when typing following test cases:

// <-|
## <-|

Note: | denotes the caret.

The reason is the caret's column being used to extract scope names instead of the one from the calculated assertion range. The assertion's column is the one of the first character of the comment punctuation.

before this commit:

</style>
## <- meta.tag.style.end.html entity.name.tag.style.html

with this commit:

</style>
## <-  meta.tag.style.end.html punctuation.definition.tag.begin.html