Skip to content

Commit c7bdd9f

Browse files
L3MON4D3github-actions[bot]
authored andcommitted
Format with stylua
1 parent 434011f commit c7bdd9f

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

lua/luasnip/init.lua

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,11 @@ local function update_dependents(node, opts)
316316
-- don't update if a jump/change_choice is in progress, or if we don't have
317317
-- an active node.
318318
if active ~= nil then
319-
local upd_res = node_update_dependents_preserve_position(
320-
node,
321-
active,
322-
{
323-
no_move = false,
324-
restore_position = true,
325-
cursor_restore_data = opts and opts.cursor_restore_data,
326-
}
327-
)
319+
local upd_res = node_update_dependents_preserve_position(node, active, {
320+
no_move = false,
321+
restore_position = true,
322+
cursor_restore_data = opts and opts.cursor_restore_data,
323+
})
328324
if upd_res.new_current then
329325
upd_res.new_current:focus()
330326
session.current_nodes[vim.api.nvim_get_current_buf()] =

lua/luasnip/util/str.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function M.multiline_to_byte_offset(str, pos)
221221

222222
-- allow positions one beyond the last character for all lines (even the
223223
-- last line).
224-
if pos[2] >= #str[pos[1]+1] + 1 then
224+
if pos[2] >= #str[pos[1] + 1] + 1 then
225225
-- in this case, pos is outside of the multiline-region.
226226
return nil
227227
end

tests/integration/choice_spec.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ describe("ChoiceNode", function()
621621
}))
622622
]])
623623

624-
screen:expect([[
624+
screen:expect([[
625625
:.ccee ee :^c{3:c}eeee: ee ee.: |
626626
{0:~ }|
627627
{2:-- SELECT --} |
@@ -630,7 +630,7 @@ screen:expect([[
630630
feed("<esc><right><right>i aa <left><left>")
631631
exec_lua("ls.set_choice(2)")
632632

633-
screen:expect([[
633+
screen:expect([[
634634
:.ccee ee :.ccee ee^ee ee.: ee ee.: |
635635
{0:~ }|
636636
{2:-- INSERT --} |
@@ -641,20 +641,20 @@ screen:expect([[
641641
exec_lua("ls.jump(-1)")
642642
exec_lua("ls.jump(-1)")
643643
exec_lua("ls.jump(1)")
644-
screen:expect([[
644+
screen:expect([[
645645
:.cc^e{3:e ee :.ccee eeee ee.: ee ee}.: |
646646
{0:~ }|
647647
{2:-- SELECT --} |
648648
]])
649649
exec_lua("ls.change_choice(1)")
650-
screen:expect([[
650+
screen:expect([[
651651
:cc^e{3:e ee :.ccee eeee ee.: ee ee}: |
652652
{0:~ }|
653653
{2:-- SELECT --} |
654654
]])
655655
exec_lua("ls.jump(1)")
656656
exec_lua("ls.jump(1)")
657-
screen:expect([[
657+
screen:expect([[
658658
:ccee ee :.cc^e{3:e eeee ee}.: ee ee: |
659659
{0:~ }|
660660
{2:-- SELECT --} |
@@ -671,7 +671,7 @@ screen:expect([[
671671
}, {restore_cursor = true})
672672
}))
673673
]=])
674-
screen:expect([[
674+
screen:expect([[
675675
a ^ a |
676676
{0:~ }|
677677
{2:-- INSERT --} |
@@ -680,26 +680,26 @@ screen:expect([[
680680
exec_lua([=[
681681
ls.snip_expand(s("bad", {i(1, "i…i")}))
682682
]=])
683-
screen:expect([[
683+
screen:expect([[
684684
a a ^i{3:…i} a a |
685685
{0:~ }|
686686
{2:-- SELECT --} |
687687
]])
688688

689689
exec_lua("ls.change_choice(1)")
690-
screen:expect([[
690+
screen:expect([[
691691
bb a ^i{3:…i} a bb |
692692
{0:~ }|
693693
{2:-- SELECT --} |
694694
]])
695695
feed("<Esc>la")
696-
screen:expect([[
696+
screen:expect([[
697697
bb a i…^i a bb |
698698
{0:~ }|
699699
{2:-- INSERT --} |
700700
]])
701701
exec_lua("ls.change_choice(1)")
702-
screen:expect([[
702+
screen:expect([[
703703
a a i…^i a a |
704704
{0:~ }|
705705
{2:-- INSERT --} |

0 commit comments

Comments
 (0)