implement goto_[first|prev|next|last]_error
#8717
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the commands
goto_[first|prev|next|last]_error
. They are basically equivalent togoto_[first|prev|next|last]_diag
but ignore all diagnostics that aren't severe enough.It closes issue #3405 and supersedes PR #6331. The latter is very similar (and was used as an inspiration) but doesn't implement
goto_[first|last]_error
.The four commands are mapped to
[|] + e|E
similar togoto_[first|prev|next|last]_diag
. The lattere
is IMO the obvious choice,e
for error and also its proximity tod
is nice, enhancing the existing muscle memory.In theory, the severity level for which diagnostics are valid targets for
goto_[first|prev|next|last]_error
could be a config flag. For now, it is hard-coded toSeverity::Error
.What do you think?