Snippet mode not existing upon reaching tabstop zero

Bug #421167 reported by Michael Henry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UltiSnips
Fix Released
Undecided
Unassigned

Bug Description

When tabstop zero has been reached and a snippet is complete, snippets mode is not properly exited. This causes a problem when the tab key is mapped as both the expand and the jump key, as the next press of tab gets swallowed in order to exit snippet mode. This can be demonstrated as follows:

- In the .vimrc file, configure the forward jump trigger as follows:

  let g:UltiSnipsJumpForwardTrigger="<tab>"

- Define a simple snippet such as:

  snippet test "A simple test"
  Expanded Text
  endsnippet

- Expand the snippet with "test" and the tab key, then press tab again.

Instead of inserting a tab character (or chaining to SuperTab), the second tab key is swallowed in the process of exiting snippet mode.

A patch to exit snippet mode after tabstop zero has been reached may be found here:

https://code.launchpad.net/~drmikehenry/ultisnips/quit-after-tabstop-zero

In addition, the patch is attached to this ticket.

Note that the test defined in the patch will fail without the patch defined here, which is needed to keep UltiSnips from swallowing the second tab keypress:

https://code.launchpad.net/~drmikehenry/ultisnips/tab-failure

This was reported in the following bug report:

https://bugs.launchpad.net/ultisnips/+bug/418062

Thanks,
Michael Henry

Related branches

Revision history for this message
Michael Henry (drmikehenry) wrote :
Revision history for this message
SirVer (sirver) wrote :

Excellent Patch. Thanks for contributing

Changed in ultisnips:
status: New → Fix Released
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.