To map mouse position to char pos, we use the `cm.coordsChar()` function. If the mouse is past the last char, then ch is set to last char.

The way CodeMirror works now, code really only needs to check for `pos.ch` === `line length`, but it seemed safer to also check > in case CodeMirror ever changes in the future. And that doesn't make the difference that you are seeing.

`cm.coordsChar()` seems to round off the mouse position, so you don't see preview if mouse is over right-half of last char, but you do see it when mouse is over left-half of last char.

To fix it we'd have to write (and maintain) a new `coordsChar()` function.

Also, based on the rounding-off observation, moving mouse over right-half of char before color should also show popover. So, another possible fix is to add half a char width to mouse x-value. The situation seems worse on Mac than Win (difference is font leading?) so might be tricky to get right. We'd also need to lookup (and maybe cache) the "half a char width" value, so this is another factor to deal with.

I'm OK with it how it is. Omitting trailing `;` does not seem to be common, and the solutions I see don't feel like the benefit is worth the trouble.