Skip to content

Commit

Permalink
Missing call to actually format an error message with its parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Oct 15, 2024
1 parent fa3c288 commit 08d6772
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ end
function helpers.move_cursor(opts)
local window = opts.window or 0

assert
.message(util.s [[
local msg = util.s [[
Cursor is already at %s.
If you just want to ensure the cursor is at this location,
use nvim_win_set_cursor directly.
]]).are_not
]]
assert
.message(msg:format(vim.inspect(opts.to))).are_not
.same(opts.to, vim.api.nvim_win_get_cursor(window))

vim.api.nvim_win_set_cursor(window, opts.to)
Expand Down

0 comments on commit 08d6772

Please sign in to comment.