aboutsummaryrefslogtreecommitdiff
path: root/bard-elisp/bard-theme.el
diff options
context:
space:
mode:
Diffstat (limited to 'bard-elisp/bard-theme.el')
-rw-r--r--bard-elisp/bard-theme.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/bard-elisp/bard-theme.el b/bard-elisp/bard-theme.el
index 41396a1..1153eaa 100644
--- a/bard-elisp/bard-theme.el
+++ b/bard-elisp/bard-theme.el
@@ -88,11 +88,13 @@
(defvar my-last-cursor-type nil)
(defun bard/update-cursor-type ()
- "Set cursor type to 'bar in text modes, 'box otherwise."
- (let ((new-cursor (if (derived-mode-p 'text-mode) 'bar 'box)))
- (unless (eq my-last-cursor-type new-cursor)
- (setq cursor-type new-cursor)
- (setq my-last-cursor-type new-cursor))))
+ "Set cursor type to 'bar in text modes, 'box otherwise.
+leave it alone in pdf-view-mode."
+ (unless (derived-mode-p 'pdf-view-mode)
+ (let ((new-cursor (if (derived-mode-p 'text-mode) 'bar 'box)))
+ (unless (eq my-last-cursor-type new-cursor)
+ (setq cursor-type new-cursor)
+ (setq my-last-cursor-type new-cursor)))))
(add-hook 'post-command-hook #'bard/update-cursor-type)