summaryrefslogtreecommitdiff
path: root/lisp/progmodes/flymake.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2017-11-09 21:16:40 +0000
committerJoão Távora <joaotavora@gmail.com>2017-11-09 21:16:40 +0000
commit535688a4181ae4052db354ce2b877507f11c9e66 (patch)
treeab0a97c86fc695bff211516faa9dfbd7cfbbd6da /lisp/progmodes/flymake.el
parent72e62d3fdb2b24dd9808f49fbbd864715337d2bf (diff)
downloademacs-535688a4181ae4052db354ce2b877507f11c9e66.tar.gz
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.
Diffstat (limited to 'lisp/progmodes/flymake.el')
-rw-r--r--lisp/progmodes/flymake.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 921ac913309..883f96747b9 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -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))