Documentation improvements: don't clean 1st tabstop if it's not empty (#929)

* don't clean 1st tabstop if it's not empty
* line → snip.line
This commit is contained in:
lacygoill 2018-03-30 20:41:33 +02:00 committed by Holger Rapp
parent 89c93fc089
commit a8e7e26954
2 changed files with 2 additions and 2 deletions

View File

@ -1582,7 +1582,7 @@ Following snippet will be expanded at 4 spaces indentation level no matter
where it was triggered.
------------------- SNIP -------------------
pre_expand "snip.buffer[snip.line] = ' '*4; snip.cursor.set(line, 4)"
pre_expand "snip.buffer[snip.line] = ' '*4; snip.cursor.set(snip.line, 4)"
snippet d
def $1():
$0

View File

@ -46,7 +46,7 @@ def clean_first_placeholder(snip):
# Jumper is a helper for performing jumps in UltiSnips.
px.snippets.make_jumper(snip)
if snip.tabstop == 2:
if snip.tabstop == 2 and not get_jumper_text(snip):
line = snip.buffer[snip.cursor[0]]
snip.buffer[snip.cursor[0]] = \
line[:snip.tabstops[1].start[1]-2] + \