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

Wrong Tabstop-index with inserted nested snippets #572

Open
JohnnyCrazy opened this issue Sep 14, 2015 · 3 comments
Open

Wrong Tabstop-index with inserted nested snippets #572

JohnnyCrazy opened this issue Sep 14, 2015 · 3 comments

Comments

@JohnnyCrazy
Copy link

Test-Case:

var suggestions = [];
suggestions.push({
    snippet: "TestMethodOne(${1:position})${2}",
});
suggestions.push({
    snippet: "Vector(${1:x}, ${2:y}, ${3:z})${4}",
});
return resolve(suggestions)

Result:
img

Expected:
After you inserted some text for the x-Variable, the next TAB should lead to the y-Variable but instead it goes to the end of the outer function. The next tabstop-index should always consider last inserted snippets before other ones IMO. This makes working with nested snippets nearly impossible.

I tried pasting both snippets into the snippets.cson and got inverted results ( covered in atom/snippets#152), so I opened the issue here since it propably is related to AC+ somehow.

@steelbrain
Copy link
Contributor

👍

@benogle
Copy link
Contributor

benogle commented Sep 15, 2015

This is probably a snippets issue, not an autocomplete-plus issue

@JohnnyCrazy
Copy link
Author

I tried pasting both snippets into the snippets.cson and got inverted results ( covered in atom/snippets#152), so I opened the issue here since it propably is related to AC+ somehow.

@benogle

To be clear: Pasting both snippets into the snippets.cson will not reproduce this bug

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants