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

cmd/govim: use visual positions for diagnostics #567

Merged
merged 1 commit into from
Dec 15, 2019

Conversation

myitcv
Copy link
Member

@myitcv myitcv commented Nov 3, 2019

No description provided.

@myitcv myitcv force-pushed the cmd_govim_visual_position branch 4 times, most recently from 585a323 to e239dc6 Compare November 5, 2019 15:49
@myitcv myitcv requested a review from leitzler November 7, 2019 10:12
@myitcv myitcv changed the title [WIP] cmd/govim: use visual positions for diagnostics cmd/govim: use visual positions for diagnostics Nov 7, 2019
@myitcv myitcv force-pushed the cmd_govim_visual_position branch 3 times, most recently from 9c39fba to 6e8213f Compare December 2, 2019 09:43
@myitcv myitcv force-pushed the cmd_govim_visual_position branch 6 times, most recently from a5a8d4a to e3df11b Compare December 12, 2019 11:48
@myitcv myitcv force-pushed the cmd_govim_visual_position branch 2 times, most recently from 87ee72b to 1fe166c Compare December 13, 2019 15:35
When displaying diagnostics, the position must be visible to the user
within Vim. Some diagnostics have start/end positions that are beyond
the visible content, i.e. they are after the final \n. The user, however
will not be able to see/understand such a position. So we adjust such
positions to be before the final \n.
Copy link
Member

@leitzler leitzler left a comment

Choose a reason for hiding this comment

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

LGTM, I've been using this for a while and I'm fairly sure that the issues I've seen occasionally are directly related to the various out-of-sync problems in gopls.

@myitcv myitcv merged commit e0fe199 into master Dec 15, 2019
@myitcv myitcv deleted the cmd_govim_visual_position branch December 15, 2019 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants