-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add back-slash before '{' or '}' will immediately change the font face. #29
Comments
this is the expected behavior: (consider
|
Weird....which piece of code do you use to ensure whether the cursor is inside the command? |
Here's the code (as far as I remember ...)
|
Hi, I did some test today and I think I found the problem: the cursor position is set to 1 for some reason everytime the font-prettifier was activate. But I did not find the reason though :P I'm not interested in reading all the related code and find the root cause. So here is my workaround, for people who also have the same issue: (use-package magic-latex-buffer
:config
;;use-package to ensure the code below was executed after magic-latex-buffer was loaded
(add-hook 'magic-latex-buffer-hook (lambda()
(defvar-local ml/current-point (point))
(add-hook 'post-self-insert-hook (lambda() (setq-local ml/current-point (point))) nil t)
(ad-remove-advice #'jit-lock-fontify-now 'around #'ml/ad-jit-lock)
(defadvice jit-lock-fontify-now (around ml/ad-jit-lock-workaround activate)
(let ((ml/jit-point ml/current-point))
ad-do-it))))) |
But in the screen-cast it don't behave like this....this can be annoying sometime.
I don't know if this is because I'm using spacemacs?
The text was updated successfully, but these errors were encountered: