bastibe / annotate.el

Annotate.el
Other
384 stars 20 forks source link

Fixed 'annotate-previous-annotation-ends' #98

Closed cage2 closed 3 years ago

cage2 commented 3 years ago

Hi @bastibe !

'annotate-previous-annotation-ends' returned the wrong results when is testing an annotation that starts at position equals to `(pos-min).

I usually paste here the commit message (reworded, maybe) but in this case the commit message is ridiculously long so i do not think this would be a good idea this time! :-D :-D

Bye! C.

bastibe commented 3 years ago

Maybe I am misunderstanding this issue, but why is it a /= instead of a >=? It seems strange to me that we would need an explicit predicate for checking whether start equals (pos-min). But, again, I am probably not understanding the issue, so consider this comment not as criticism, and merge when you're ready!

cage2 commented 3 years ago

On Wed, Feb 10, 2021 at 12:42:17AM -0800, Bastian Bechtold wrote:

Hi Bastian!

Maybe I am misunderstanding this issue, but why is it a /= instead of a >=? It seems strange to me that we would need an explicit predicate for checking whether start equals (pos-min). But, again, I am probably not understanding the issue, so consider this comment not as criticism, and merge when you're ready!

You are correct! In fact the original test was wrong and this the patch substitutes /= with `>'. :)

I checked again the changes after your message because i was not sure if the test should be '>' or '>=', fortunately seems to me that the behaviour of the function was the same regardless of the comparison predicate used; good that your message made me rethink about the modification! :)

Bye! C.