evil-easymotion icon indicating copy to clipboard operation
evil-easymotion copied to clipboard

Avoid infinite loops in overlays

Open LemonBreezes opened this issue 9 months ago • 3 comments

Handle infinite loops. This fixes #68 and also an issue where evilem-motion-previous-line is getting stuck on the Dired header for me. Going to be testing this for some time.

LemonBreezes avatar Mar 25 '25 02:03 LemonBreezes

@PythonNut Hey, what do you think about this change?

LemonBreezes avatar Jul 24 '25 18:07 LemonBreezes

Hi @LemonBreezes, to be honest the changes are pretty complex so haven't been able to convince myself they are correct. I'd at least like to understand how it works before I merge it, since I'll be responsible for maintaining it afterwards. Unfortunately I've been quite busy so I haven't had the time to really sit down and work everything out. I appreciate the time you spent coming up with this! I don't think I'd have the time to fix the original issue myself either.

PythonNut avatar Jul 25 '25 17:07 PythonNut

Hi @LemonBreezes, to be honest the changes are pretty complex so haven't been able to convince myself they are correct. I'd at least like to understand how it works before I merge it, since I'll be responsible for maintaining it afterwards. Unfortunately I've been quite busy so I haven't had the time to really sit down and work everything out. I appreciate the time you spent coming up with this! I don't think I'd have the time to fix the original issue myself either.

First of all, I am using Emacs31 and Doom Emacs.

Ok. Now lemme explain. The problem is that the Dired headerline is an overlay and when I use evilem-motion-previous-line in Dired that command gets stuck in an infinite loop on the headerline because inside of this loop image We basically end up in an infinite loop between the point after the overlay and the overlay itself: image image So I wanted to have some logic to detect if we are getting stuck in an overlay basically.

LemonBreezes avatar Jul 25 '25 21:07 LemonBreezes

I am using doom emacs with emacs 31, I can confirm this commit solved the problem of searching backward, e.g. evilem-motion-backward-word-begin, evilem-motion-previous-line in dired buffer.

JiaweiChenC avatar Jan 07 '26 22:01 JiaweiChenC