UltiSnips does not cope with auto wrapping
Bug #719998 reported by
SirVer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Reported by Gregor by Mail:
Aside from that I think I am experiencing a bug with ultisnips and
auto-wrapping enabled (i.e. in tex files). I think the options to
reproduce the problem are :set tw=xxx and :set fo=tcq
The problem occurs when I am editing inside a placeholder (like the
\ref{} snippet for tex files) that is being wrapped to the next line.
Then the snippet is corrupted and inserted multiple times.
You can try these steps to reproduce:
1. vim foo.tex -c 'set tw=10' -c 'call feedkeys("itest r\<tab>")'
2. Enter 'foo bar' without the qoutes
I am using ultisnips-1.3 and the latest vim-7.3.121 on linux.
Related branches
Changed in ultisnips: | |
milestone: | none → 1.4 |
To post a comment you must log in.
I can easily reproduce this, but i am not sure how to fix this.
The problem is that vim does not inform plugins about when or how it is modifying the buffer. Therefore ultisnips guesses the changes that happen from the movement of the cursor. Autoformatting can change the complete buffer (literally every line) and guessing is bound to fail in this case. I am therefore unsure what we can do to fix this problem and I am very open for suggestions.