Skip to content

Commit

Permalink
fix(qf): better error message. Fixes #892
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 8, 2023
1 parent 57c7ba1 commit 448d502
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lua/lazyvim/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ return {
if require("trouble").is_open() then
require("trouble").previous({ skip_groups = true, jump = true })
else
vim.cmd.cprev()
local ok, err = pcall(vim.cmd.cprev)
if not ok then
vim.notify(err, vim.log.levels.ERROR)
end
end
end,
desc = "Previous trouble/quickfix item",
Expand All @@ -378,7 +381,10 @@ return {
if require("trouble").is_open() then
require("trouble").next({ skip_groups = true, jump = true })
else
vim.cmd.cnext()
local ok, err = pcall(vim.cmd.cnext)
if not ok then
vim.notify(err, vim.log.levels.ERROR)
end
end
end,
desc = "Next trouble/quickfix item",
Expand Down

0 comments on commit 448d502

Please sign in to comment.