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

Add ability to set end column and line on error #1400

Closed
wants to merge 2 commits into from

Commits on Jun 21, 2018

  1. Add ability to set end column and line on errors

    This change allows checkers to position error overlays precisely, either using
    start and end columns, or using an explicit region.  In addition to
    flycheck-error-new-at, kept for backwards compatibility, clients can now use
    flycheck-error-new-with-coords and flycheck-error-new-with-region.
    
    No changes should be requires in existing checkers: for compatibility, the old
    flycheck-error-line and flycheck-error-columns getters now return the start line
    and column, and the corresponding setters reset the end line and column.
    
    Because converting between buffer offsets and line/column pairs is costly, the
    calculations are done lazily, using accessor functions that cache their results.
    All coordinates are stored in a new flycheck-coords structure.  We originally
    thought that we could compute buffer offsets eagerly when given line/column
    pairs, but many checkers start by creating an error object and then adjust
    individual line-column values (e.g. using flycheck-increment-error-columns).
    jbaum98 authored and cpitclaudel committed Jun 21, 2018
    Configuration menu
    Copy the full SHA
    7166818 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    617f536 View commit details
    Browse the repository at this point in the history