Fix diagnostic position when sha changes (#299)
Fix: Remove API calls on Discussion Close (#328)
Chore: Remove root node type (#329)

This is a PATCH release.
This commit is contained in:
Harrison (Harry) Cramer
2024-07-06 13:09:56 -04:00
committed by GitHub
parent dc70c97810
commit 95dcc41885
8 changed files with 80 additions and 44 deletions

View File

@@ -67,8 +67,9 @@ end
---@param d_or_n Discussion|DraftNote
---@return boolean
M.is_old_sha = function(d_or_n)
local first_note = M.get_first_note(d_or_n)
return first_note.position.old_line ~= nil
local position = M.get_first_note(d_or_n).position
local old_start_line = position.line_range ~= nil and M.parse_line_code(position.line_range.start.line_code) or nil
return position.old_line ~= nil and old_start_line ~= 0
end
---@param discussion Discussion|DraftNote