Skip to content

Commit 6a679df

Browse files
committed
Fix box and bbox snippets outside the first column
1 parent 89427d7 commit 6a679df

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

UltiSnips/all.snippets

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,25 @@ endglobal
7878
snippet box "A nice box with the current comment symbol" b
7979
`!p
8080
box = make_box(len(t[1]))
81-
snip.rv = box[0] + '\n' + box[1]
81+
snip.rv = box[0]
82+
snip += box[1]
8283
`${1:content}`!p
8384
box = make_box(len(t[1]))
84-
snip.rv = box[2] + '\n' + box[3]`
85+
snip.rv = box[2]
86+
snip += box[3]`
8587
$0
8688
endsnippet
8789

8890
snippet bbox "A nice box over the full width" b
8991
`!p
9092
width = int(vim.eval("&textwidth")) or 71
9193
box = make_box(len(t[1]), width)
92-
snip.rv = box[0] + '\n' + box[1]
94+
snip.rv = box[0]
95+
snip += box[1]
9396
`${1:content}`!p
9497
box = make_box(len(t[1]), width)
95-
snip.rv = box[2] + '\n' + box[3]`
98+
snip.rv = box[2]
99+
snip += box[3]`
96100
$0
97101
endsnippet
98102

0 commit comments

Comments
 (0)