Skip to content

Commit

Permalink
test: goto char multiline helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Apr 10, 2024
1 parent 219acb1 commit 254ffa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function M.make_suite(lang, name, input, expected, go_to)
local lines = vim.split(input, '\n', { plain = true, trimempty = false })
vim.api.nvim_buf_set_lines(bufnr, 0, 1, false, lines)
if type(go_to) == 'string' then
vim.cmd.norm('f'..go_to)
vim.cmd.norm('/'..go_to..'<cr>')
vim.cmd.norm('noh<cr>')
elseif type(go_to) == 'table' then
vim.api.nvim_win_set_cursor(0, go_to)
end
Expand Down

0 comments on commit 254ffa9

Please sign in to comment.