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

Swiper changes the faces of text buttons #1212

Closed
Alexander-Miller opened this Issue Sep 24, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@Alexander-Miller
Copy link
Contributor

commented Sep 24, 2017

Steps to reproduce:

  • emacs -q
  • load swiper
  • switch to a text-mode buffer
  • (insert-text-button "AAAAAAAAA" 'face 'font-lock-constant-face)
  • Run swiper
  • The inserted button's face has now changed from constant to button

Strangely enough this only happens once. After the first face change this behaviour stops.
I tried both emacs 25 and emacs 26, same as my other issue.

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Sep 25, 2017

Is this because of font-lock-ensure? In that case, it's an Emacs bug.

@Alexander-Miller

This comment has been minimized.

Copy link
Contributor Author

commented Sep 25, 2017

Looks like it is. I've opened a bug ticket for it.

Since this is not swiper-specific I'll close this issue.

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Sep 26, 2017

Thanks, closing.

@abo-abo abo-abo closed this Sep 26, 2017

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Sep 26, 2017

If you want, I'll add an offending major-mode to swiper-font-lock-exclude - a quick temporary fix.

@Alexander-Miller

This comment has been minimized.

Copy link
Contributor Author

commented Sep 26, 2017

Thanks, closing.

Could've sworn I did that already. At least I wanted to.

swiper-font-lock-exclude

I think I ran into one of your blog posts about that when looking up font-lock-ensure - needing to make sure that the entire buffer is fontified for swiper? If so the exclusion is a good idea, other than assigning buttons' faces treemacs has no interaction with font locking. The major-mode's symbol is simply treemacs-mode.

abo-abo added a commit that referenced this issue Sep 26, 2017

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Sep 26, 2017

OK, updated. Please check if it works.

@Alexander-Miller

This comment has been minimized.

Copy link
Contributor Author

commented Sep 27, 2017

Fix is working 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.