Release (#330)
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:
committed by
GitHub
parent
dc70c97810
commit
95dcc41885
@@ -72,19 +72,17 @@ local create_multiline_diagnostic = function(d_or_n)
|
||||
error("Parsing multi-line comment but note does not contain line range")
|
||||
end
|
||||
|
||||
local start_old_line, start_new_line = indicators_common.parse_line_code(line_range.start.line_code)
|
||||
local start_line, end_line, _ = actions_common.get_line_numbers_for_range(
|
||||
first_note.position.old_line,
|
||||
first_note.position.new_line,
|
||||
line_range.start.line_code,
|
||||
line_range["end"].line_code
|
||||
)
|
||||
|
||||
if indicators_common.is_new_sha(d_or_n) then
|
||||
return create_diagnostic({
|
||||
lnum = start_new_line - 1,
|
||||
end_lnum = first_note.position.new_line - 1,
|
||||
}, d_or_n)
|
||||
else
|
||||
return create_diagnostic({
|
||||
lnum = start_old_line - 1,
|
||||
end_lnum = first_note.position.old_line - 1,
|
||||
}, d_or_n)
|
||||
end
|
||||
return create_diagnostic({
|
||||
lnum = start_line - 1,
|
||||
end_lnum = end_line - 1,
|
||||
}, d_or_n)
|
||||
end
|
||||
|
||||
---Set diagnostics in currently new SHA.
|
||||
|
||||
Reference in New Issue
Block a user