Subject: Re: bug#29201: 26.0.90; Flymake skips indicator when a backend reports a diagnostic at EOB

From: Dmitry Gutov <[email-masked]>
Date: Fri, 10 Nov 2017 02:02:04 +0200

On 11/9/17 11:18 PM, João Távora wrote:

> "Backtracking a little" sounds OK but highlighting the last symbol is a
> little more contentious and harder to do (though I'm open to that
> argument).

That's okay.

> Anyway, this is a simple bug because my original idea was to make this
> case behave like the case where the last line is referenced but without
> a column indication. Inside flymake-diag-region, this should funnel into
> fallback-eol but in this particular case it wasn't doind that because I
> forgot that (goto-char one-trillion) doesn't error.
> 
> Fixed in 535688a4181ae4052db354ce2b877507f11c9e66.

The idea sounds fine, but it doesn't work when the last line of the 
buffer is empty (e.g. when the file ends with a newline, like with 
require-final-newline set to t): highlighting the last line still ends 
up creating a zero-size overlay.

So I think the important point is to skip the trailing whitespace first. 
Maybe this calls for a test case or two.