evilem-motion-find-char-backward hangs when the char is in a folded subtree
How to reproduce:
- Open a new org file and paste this outline:
* x
* a
** a
* b
- Place your cursor at the headline
b - Trigger
evilem-motion-find-char-backwardand enter theakey. The command will run without a problem. - Now fold the top heading
aand return tob. - Repeat step 3. This should freeze up Emacs, forcing you to use
C-gto stop the command - Trigger
evilem-motion-find-char-backwardagain, this time search forx. Emacs won't freeze in this case. - Now place your cursor at the headline
x - Trigger
evilem-motion-find-char-forwardand search for 'a'. This command will run successfully too.
So it seems that evilem have trouble searching a character backwards, but only if that character is within a folded subtree.
Was this issue introduced in f96c2ed?
Oh wait it shouldn't have been since that feature is disabled by default. I'll have to look into it.
Thanks for the excellent description. I came here to write a similar issue once I had finally narrowed the scenario down.
Ah I took a look at this and I understand that the overlay-skip bit assumes that you're going forward and skips to the end of the overlay. If you're going backward then this obviously doesn't hold.
Unfortunately, it's not clear to me what the logic should be.