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

Disable Blinking Cursor in PDFView mode #892

Closed
mustaqimM opened this issue Sep 16, 2018 · 7 comments
Closed

Disable Blinking Cursor in PDFView mode #892

mustaqimM opened this issue Sep 16, 2018 · 7 comments
Labels
is:bug Something isn't working as intended status:resolved Issue was addressed internally

Comments

@mustaqimM
Copy link

mustaqimM commented Sep 16, 2018

With evil enabled, the cursor blinks when in PDFView mode. Ideally, the cursor bar should not be shown.

I'm still understanding Emacs and lisp but I thought this would work:

(after! pdf-view-mode-hook
  (setq blink-cursor-mode nil))

I got it to work by setting:

(after! pdf-tools-modes
  (add-hook! 'pdf-view-mode-hook (blink-cursor-mode -1)))

But how do I hide it completely or colour it match the page?

@hlissner
Copy link
Member

Ah, I see what you mean. Does (setq-hook! 'pdf-view-mode-hook blink-cursor-mode nil) work for you?

@hlissner hlissner added the status:unconfirmed Still under investigation. label Sep 18, 2018
@mustaqimM
Copy link
Author

No it doesn't, and the line I quoted above as working before, doesn't seem to anymore

@hlissner
Copy link
Member

As it turns out, blink-cursor-mode is a global mode, so there's no disabling it for one buffer.

So instead, try adding (blink-cursor-mode -1) to your private config.el. I intend to disable it in an upcoming update, as it's proven too distracting in many cases.

@hlissner hlissner added is:bug Something isn't working as intended and removed status:unconfirmed Still under investigation. labels Sep 18, 2018
hlissner added a commit that referenced this issue Sep 19, 2018
+ Move minibuffer fringe disabler to ui/doom
+ Disable blink-cursor-mode (too distracting, causes other issues e.g.
  #892)
@hlissner
Copy link
Member

I've disabled blink-cursor-mode globally, which should resolve your issue. Could you update and give it a try? If not, I can explicitly disable the cursor in pdf-view-mode with:

  (add-hook! 'pdf-view-mode-hook (internal-show-cursor nil nil))

@hlissner hlissner added the status:resolved Issue was addressed internally label Sep 19, 2018
@mustaqimM
Copy link
Author

mustaqimM commented Sep 19, 2018

Yes! It's working, thanks, though I prefer

(add-hook! 'pdf-view-mode-hook (internal-show-cursor nil nil))

because it doesn't show the cursor at all, the (blink-cursor-mode -1) option still shows the cursor as a blue border around the page

@hlissner
Copy link
Member

And done! I'll consider this resolved. Let me know if it gives you any more trouble.

hlissner added a commit that referenced this issue Sep 21, 2018
Causes an issue where cursor invisibility persists through a workspace
session restore.

Relevant to #892
@hlissner
Copy link
Member

I had to revert fd7f498 due to an issue with the cursor becoming invisible in other windows when restoring a session.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
is:bug Something isn't working as intended status:resolved Issue was addressed internally
Projects
None yet
Development

No branches or pull requests

2 participants