+1
-1
lines changedFilter options
+1
-1
lines changed Original file line number Diff line number Diff line change
@@ -386,7 +386,7 @@ local function get_diagnostics(bufnr, opts, clamp)
386
386
if not opts.lnum or d.lnum == opts.lnum then
387
387
if clamp and vim.api.nvim_buf_is_loaded(b) then
388
388
local line_count = buf_line_count[b] - 1
389
-
if (d.lnum > line_count or d.end_lnum > line_count) then
389
+
if (d.lnum > line_count or d.end_lnum > line_count or d.lnum < 0 or d.end_lnum < 0) then
390
390
d = vim.deepcopy(d)
391
391
d.lnum = math.max(math.min(d.lnum, line_count), 0)
392
392
d.end_lnum = math.max(math.min(d.end_lnum, line_count), 0)
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4