Skip to content
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

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

Open
archiif opened this issue Aug 27, 2020 · 4 comments
Labels

Comments

@archiif
Copy link

archiif commented Aug 27, 2020

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.

@PythonNut
Copy link
Owner

Was this issue introduced in f96c2ed?

@PythonNut
Copy link
Owner

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

@PythonNut PythonNut added the bug label Apr 24, 2021
@martinbaillie
Copy link

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

@PythonNut
Copy link
Owner

PythonNut commented Feb 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants