Skip to content

Commit 77f5131

Browse files
author
Andrew Ferrier
committed
fix: Test relied on not clearing buffer
1 parent 05b61a5 commit 77f5131

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/debugprint.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ local write_file = function(filetype)
1818
end
1919

2020
local init_file = function(lines, filetype, row, col)
21+
vim.cmd('new')
22+
vim.cmd('only')
2123
vim.api.nvim_buf_set_lines(0, 0, -1, false, lines)
2224
local filename = write_file(filetype)
2325
vim.api.nvim_win_set_cursor(0, { row, col })
@@ -593,7 +595,7 @@ describe("can handle treesitter identifiers", function()
593595
"function x()",
594596
"local xyz = 3",
595597
"end",
596-
}, "lua", 2, 6)
598+
}, "lua", 2, 5)
597599

598600
feedkeys("g?vapple<CR>")
599601

@@ -606,7 +608,7 @@ describe("can handle treesitter identifiers", function()
606608
"end",
607609
})
608610

609-
assert.are.same(vim.api.nvim_win_get_cursor(0), { 2, 6 })
611+
assert.are.same(vim.api.nvim_win_get_cursor(0), { 2, 5 })
610612
end)
611613

612614
it("disabled at function level", function()

0 commit comments

Comments
 (0)