Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[READY] Take care of start column in multiline diags for detailed diag popups #4218

Conversation

bstaletic
Copy link
Collaborator

@bstaletic bstaletic commented Jan 31, 2024

PR Prelude

Thank you for working on YCM! :)

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your PR:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have included tests for the changes in my PR. If not, I have included a
    rationale for why I haven't.
  • I understand my PR may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Why this change is necessary and useful

Previously, we have always used the diagnostics start column of the starting line of a multiline diagnostic. This is wrong, as the starting column for a line in the middle of a multiline diagnostic is always 1.

Previous patch just happens to work if the start column of the first line of the diagnostic is also 1.

Fixes #4196


This change is Reviewable

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Merging #4218 (06aa107) into master (2b33bf3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4218   +/-   ##
=======================================
  Coverage   89.70%   89.71%           
=======================================
  Files          34       34           
  Lines        4420     4424    +4     
=======================================
+ Hits         3965     3969    +4     
  Misses        455      455           

@bstaletic bstaletic force-pushed the detailed-diag-popup-part2-electric-boogaloo branch 3 times, most recently from 6d07604 to 06aa107 Compare January 31, 2024 10:43
Previously, we have always used the diagnostics start column of the
*starting* line of a multiline diagnostic. This is wrong, as the
starting column for a line in the middle of a multiline diagnostic is
always 1.

Previous patch just happens to work if the start column of the first
line of the diagnostic is also 1.
Copy link
Member

@puremourning puremourning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @bstaletic)

@bstaletic bstaletic added the Ship It! Manual override to merge a PR by maintainer label Feb 1, 2024
Copy link
Contributor

mergify bot commented Feb 1, 2024

Thanks for sending a PR!

@mergify mergify bot merged commit c55e732 into ycm-core:master Feb 1, 2024
12 of 13 checks passed
@bstaletic bstaletic deleted the detailed-diag-popup-part2-electric-boogaloo branch February 1, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ship It! Manual override to merge a PR by maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YCM error when g:ycm_show_detailed_diag_in_popup = 1
2 participants