[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/focus 155da77a32 60/82: Fixes #14
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/focus 155da77a32 60/82: Fixes #14 |
Date: |
Tue, 6 Sep 2022 04:58:58 -0400 (EDT) |
branch: elpa/focus
commit 155da77a324f28fd37f6167d5c843c491dc3327d
Author: Lars Tveito <larstvei@ifi.uio.no>
Commit: Lars Tveito <larstvei@ifi.uio.no>
Fixes #14
In `focus-read-only-mode` the `cursor-type` was unconditionally set to `t`,
and
did not restore the users customized cursor type. This is fixed by storing
the
original value of `cursor-type` in `focus-cursor-type`.
---
focus.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/focus.el b/focus.el
index b22a05f83a..c2bb6d48d1 100644
--- a/focus.el
+++ b/focus.el
@@ -70,6 +70,9 @@ Things that are defined include `symbol', `list', `sexp',
:type '(float)
:group 'focus)
+(defvar focus-cursor-type cursor-type
+ "Used to restore the users `cursor-type'")
+
(defvar focus-current-thing nil
"Overrides the choice of thing dictated by `focus-mode-to-thing' if set.")
@@ -236,7 +239,7 @@ This is added to the `pre-command-hook' when
(when (and focus-read-only-mode
(not (member last-command '(focus-next-thing focus-prev-thing))))
(when focus-read-only-blink-timer (cancel-timer
focus-read-only-blink-timer))
- (setq cursor-type t)
+ (setq cursor-type focus-cursor-type)
(setq focus-read-only-blink-timer
(run-at-time focus-read-only-blink-seconds nil
'focus-read-only-hide-cursor (current-buffer)))))
@@ -256,7 +259,7 @@ Enables `read-only-mode', hides the cursor and adds
Disables `read-only-mode' and shows the cursor again. It cleans
up the `focus-read-only-blink-timer' and hooks."
(read-only-mode -1)
- (setq cursor-type t)
+ (setq cursor-type focus-cursor-type)
(when focus-read-only-blink-timer
(cancel-timer focus-read-only-blink-timer))
(setq focus-read-only-blink-timer nil)
@@ -293,6 +296,8 @@ up the `focus-read-only-blink-timer' and hooks."
(define-key map (kbd "i") 'turn-off-focus-read-only-mode)
(define-key map (kbd "q") 'turn-off-focus-read-only-mode)
map)
+ (when cursor-type
+ (setq focus-cursor-type cursor-type))
(if focus-read-only-mode (focus-read-only-init) (focus-read-only-terminate)))
(provide 'focus)
- [nongnu] elpa/focus 0f2a9945e9 66/82: Fixed some flycheck warnings., (continued)
- [nongnu] elpa/focus 0f2a9945e9 66/82: Fixed some flycheck warnings., ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 1423efbd25 42/82: Don't assume bounds are found, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 19b3c7b348 70/82: Just use a face for customizing the unfocused region, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus bfb6aaf8ad 57/82: Don't persist focus mode across major mode change, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus a84ade00a2 61/82: Addresses #13, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus f193014150 15/82: Did not work, back to static width, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus ef5f7fc892 45/82: Cleaned up `focus-next-thing' and `focus-prev-thing', ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e9e841aed4 78/82: Remove sentence, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus f058bd163d 64/82: Fixed compile warnings., ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 5f3f20e7f2 80/82: Bump version, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 155da77a32 60/82: Fixes #14,
ELPA Syncer <=
- [nongnu] elpa/focus cbba87b062 74/82: Trim candidate list of *things*, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 0a6e9624ea 49/82: Allow for changing the current thing interactively, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 90806dc7ea 18/82: Added custom variable for setting dimness, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 704db49988 82/82: Merge pull request #24 from phikal/master, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus c89d08f510 24/82: Applied purcell's recommendations, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 94ed8ab68b 36/82: Defined variables to help hide the cursor, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e8c1eb5ce2 16/82: Added short commentary, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 75202c9445 58/82: Version bump, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 8028fc088f 04/82: Improved average color function, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e9ab37b865 81/82: Improved user option types, ELPA Syncer, 2022/09/06