Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lua/gitlab/actions/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ M.get_line_numbers_for_range = function(old_line, new_line, start_line_code, end
return (old_line - range), old_line, false
elseif new_line ~= nil then
local range = new_end_line - new_start_line
return (new_line - range), new_line, true
-- Force start_line to be greater than 0
local start_line = (new_line - range > 0) and (new_line - range) or 1
return start_line, new_line, true
else
u.notify("Error getting new or old line for range", vim.log.levels.ERROR)
return 1, 1, false
Expand Down
3 changes: 3 additions & 0 deletions lua/gitlab/indicators/diagnostics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ M.place_diagnostics = function(bufnr)
u.notify("Could not find Diffview view", vim.log.levels.ERROR)
return
end
if vim.api.nvim_buf_get_name(bufnr) == "diffview://null" then
return
end

local ok, err = pcall(function()
local file_discussions = List.new(M.placeable_discussions):filter(function(discussion_or_note)
Expand Down
Loading