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:
parent
89c93fc089
commit
a8e7e26954
@ -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
|
||||
|
@ -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] + \
|
||||
|
Loading…
Reference in New Issue
Block a user