From a8e7e2695467c66d8b2bd5ef4d3d43ad71ad3eef Mon Sep 17 00:00:00 2001 From: lacygoill Date: Fri, 30 Mar 2018 20:41:33 +0200 Subject: [PATCH] Documentation improvements: don't clean 1st tabstop if it's not empty (#929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * don't clean 1st tabstop if it's not empty * line → snip.line --- doc/UltiSnips.txt | 2 +- doc/examples/autojump-if-empty/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/UltiSnips.txt b/doc/UltiSnips.txt index 147fe7e..4645c8f 100644 --- a/doc/UltiSnips.txt +++ b/doc/UltiSnips.txt @@ -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 diff --git a/doc/examples/autojump-if-empty/README.md b/doc/examples/autojump-if-empty/README.md index 8b4a7fc..2169773 100644 --- a/doc/examples/autojump-if-empty/README.md +++ b/doc/examples/autojump-if-empty/README.md @@ -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] + \