Extra whitespace when a marker includes a new line

Bug #1219973 reported by John Szakmeister
6
This bug affects 1 person
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:
      "${3:doc-string}"
      }[${4:arg-list}]
      $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).

Revision history for this message
SirVer (sirver) wrote :

I can confirm this bug in the latest version of UltiSnips. Thanks for reporting - patches are welcome :).

Changed in ultisnips:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.