Commit 535688a4 authored by João Távora's avatar João Távora

Flymake correctly highlights whole last line if eob (bug#29201)

If a line/column pair indicates an end-of-buffer position, flymake
should behave like the case where the last line of the buffer is
referenced without a column indication.  This behavior is currently
to highlight the whole last line.

* lisp/progmodes/flymake.el (flymake-diag-region): Correct
conditions of fallback to the fallback-eol local function.
parent 72e62d3f
......@@ -334,7 +334,8 @@ region is invalid."
(end (or (and sexp-end
(not (= sexp-end beg))
sexp-end)
(ignore-errors (goto-char (1+ beg)))))
(and (< (goto-char (1+ beg)) (point-max))
(point))))
(safe-end (or end
(fallback-eol beg))))
(cons (if end beg (fallback-bol))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment