newlines in tabstop default text break the snippet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The output of :py import sys; print sys.version:
2.6.5 (r265:79063, Apr 16 2010, 13:28:26)
[GCC 4.4.3]
I attached unit tests which demonstrate the problem. All of the tests, except for the one that should, fail. Rather than jumping to the first tab stop after expanding the snippet, ultisnips causes vim to leave (and stay out of) insert mode.
I think that at least part of the problem has to do with the fact that the newline character '\n' exists at the end of the previous line. When ultisnips tries to jump to tab stop #1 in:
x${1:
}
then it tries to select a range (0,1)->(1,0), but it should only select (0,1).
I'm happy to try to fix this (and I'm looking for a way to do so), but I'm not sure where in the code it should be fixed. Any suggestions, or an actual fix would be great!
Related branches
Changed in ultisnips: | |
status: | Fix Committed → Confirmed |
Have you tried using the escape sequence '\n' in the snippet instead of an actual newline?