commit 356244d50ba01c63b3ac33057a69462c4029612c
parent 49e32cbdf8467ecb3da30e4a0d566341c7fa6f1f
Author: Martin Kunz <martinkunz@email.cz>
Date: Sat, 29 Oct 2022 01:13:27 +0200
fix(docs): nil as viable argument for goto_prev (#20852)
Added `nil` as a possible option to `vim.diagnostics.goto_prev` in the
docs
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
@@ -519,7 +519,7 @@ goto_prev({opts}) *vim.diagnostic.goto_prev()*
Move to the previous diagnostic in the current buffer.
Parameters: ~
- • {opts} (table) See |vim.diagnostic.goto_next()|
+ • {opts} (table|nil) See |vim.diagnostic.goto_next()|
hide({namespace}, {bufnr}) *vim.diagnostic.hide()*
Hide currently displayed diagnostics.
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
@@ -797,7 +797,7 @@ function M.get_prev_pos(opts)
end
--- Move to the previous diagnostic in the current buffer.
----@param opts table See |vim.diagnostic.goto_next()|
+---@param opts table|nil See |vim.diagnostic.goto_next()|
function M.goto_prev(opts)
return diagnostic_move_pos(opts, M.get_prev_pos(opts))
end