Extra whitespace when a marker includes a new line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Using this snippet definition, there's an extra space after "name":
snippet defn "defn" b
(defn ${1:name} ${2:
"
}
$0)
endsnippet
Moreover, when you type a name (for instance, foobar) and hit tab, another space appears at the end of the line when selecting the newline plus the doc-string.
To make it more clear, immediately after snippet expansion I see this:
(defn |name_
"doc-string"
[arg-list]
)
where '|' is the cursor location, and _ is the trailing whitespace being inserted. If I give the function the name foobar, I see this:
(defn foobar__
"doc-string|"
[arg-list]
)
Only one of trailing whitespaces is highlighted in the selection.
My expectation is for no extra whitespace. This is with a fairly recent version of UltiSnips (from August 5th, 2013).
I can confirm this bug in the latest version of UltiSnips. Thanks for reporting - patches are welcome :).