Skip to content

Commit

Permalink
fix: default to current window in jump_to_item (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
elkowar committed Sep 5, 2022
1 parent 8482e37 commit ec24219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function M.jump_to_item(win, precmd, item)
else
vim.cmd("buffer " .. item.bufnr)
end
vim.api.nvim_win_set_cursor(win, { item.start.line + 1, item.start.character })
vim.api.nvim_win_set_cursor(win or 0, { item.start.line + 1, item.start.character })
end

function M.fix_mode(opts)
Expand Down

0 comments on commit ec24219

Please sign in to comment.