Fixes creating thread buffers for existing comments.
When a comment is first created but before it's submitted, the thread object in Review:add_comment is stubbed with a valid value given for originalStartLine. ThreadPanel:create_thread_buffer then uses this to correctly render the thread.
But after submitting the comment, the response from the GH API doesn't include a value for originalStartLine for single-line comments, as mentioned here. This breaks the rendering in create_thread_buffer.
Does this pull request fix one issue?
Fixes #314
Describe how you did it
The fix was to fall back to thread.originalLine if thread.originalStartLine is set to vim.NIL.
Describe what this PR does / why we need it
Fixes creating thread buffers for existing comments.
When a comment is first created but before it's submitted, the
thread
object inReview:add_comment
is stubbed with a valid value given fororiginalStartLine
.ThreadPanel:create_thread_buffer
then uses this to correctly render the thread.But after submitting the comment, the response from the GH API doesn't include a value for
originalStartLine
for single-line comments, as mentioned here. This breaks the rendering increate_thread_buffer
.Does this pull request fix one issue?
Fixes #314
Describe how you did it
The fix was to fall back to
thread.originalLine
ifthread.originalStartLine
is set tovim.NIL
.Describe how to verify it
Special notes for reviews