diff --git a/lua/gitlab/actions/comment.lua b/lua/gitlab/actions/comment.lua index 9dbc1ad3..c4644ef1 100644 --- a/lua/gitlab/actions/comment.lua +++ b/lua/gitlab/actions/comment.lua @@ -359,6 +359,8 @@ M.create_comment_suggestion = function() local layout = M.create_comment_layout({ ranged = range_length > 0, unlinked = false }) if layout ~= nil then layout:mount() + else + return -- Failure in creating the comment layout end vim.schedule(function() if suggestion_lines then diff --git a/lua/gitlab/annotations.lua b/lua/gitlab/annotations.lua index 4872995c..1e31d9be 100644 --- a/lua/gitlab/annotations.lua +++ b/lua/gitlab/annotations.lua @@ -114,7 +114,8 @@ ---@class DiffviewInfo ---@field modification_type string ---@field file_name string ----@field old_file_name string -- Relevant for renamed files +---Relevant for renamed files only, the name of the file in the previous commit +---@field old_file_name string ---@field current_bufnr integer ---@field new_sha_win_id integer ---@field old_sha_win_id integer