Skip to content

Avoid infinite loops in overlays #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LemonBreezes
Copy link

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 LemonBreezes force-pushed the avoid-infinite-loops-in-overlays branch from b8c863f to 7f5b734 Compare March 25, 2025 03:04
@LemonBreezes LemonBreezes marked this pull request as ready for review March 25, 2025 03:36
@LemonBreezes LemonBreezes force-pushed the avoid-infinite-loops-in-overlays branch from 7f5b734 to 6b95442 Compare March 25, 2025 03:38
@LemonBreezes LemonBreezes force-pushed the avoid-infinite-loops-in-overlays branch from 6b95442 to 69ccd3b Compare March 25, 2025 03:39
@LemonBreezes
Copy link
Author

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

@PythonNut
Copy link
Owner

PythonNut commented Jul 25, 2025

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.

@LemonBreezes
Copy link
Author

LemonBreezes commented Jul 25, 2025

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 LemonBreezes marked this pull request as draft August 3, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

evilem-motion-find-char-backward hangs when the char is in a folded subtree
2 participants