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

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

Open archiif opened this issue 5 years ago • 4 comments

How to reproduce:

  1. Open a new org file and paste this outline:
* x
* a
** a 
* b
  1. Place your cursor at the headline b
  2. Trigger evilem-motion-find-char-backward and enter the a key. The command will run without a problem.
  3. Now fold the top heading a and return to b.
  4. Repeat step 3. This should freeze up Emacs, forcing you to use C-g to stop the command
  5. Trigger evilem-motion-find-char-backward again, this time search for x. Emacs won't freeze in this case.
  6. Now place your cursor at the headline x
  7. Trigger evilem-motion-find-char-forward and 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.

archiif avatar Aug 27 '20 02:08 archiif

Was this issue introduced in f96c2ed?

PythonNut avatar Apr 24 '21 19:04 PythonNut

Oh wait it shouldn't have been since that feature is disabled by default. I'll have to look into it.

PythonNut avatar Apr 24 '21 19:04 PythonNut

Thanks for the excellent description. I came here to write a similar issue once I had finally narrowed the scenario down.

martinbaillie avatar Jan 06 '22 22:01 martinbaillie

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.

PythonNut avatar Feb 03 '22 06:02 PythonNut