branch: externals/cursory commit c9686b2658b0434e811afccd83fc718806497c2b Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Store the selected preset in a variable --- cursory.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cursory.el b/cursory.el index da7d7e56a6..1f8f2bd984 100644 --- a/cursory.el +++ b/cursory.el @@ -311,6 +311,9 @@ Saving is done by the `cursory-store-latest-preset' function." blink-cursor-delay)) (kill-local-variable var))) +(defvar cursory-last-selected-preset nil + "The last value of `cursory-set-preset'.") + (defun cursory--set-preset-with-scope (preset &optional local) "Set PRESET of `cursory-presets' to the global scope. With optional non-nil LOCAL, set STYLES scoped locally to the @@ -323,6 +326,7 @@ current buffer." (blinks (plist-get styles :blink-cursor-blinks)) (interval (plist-get styles :blink-cursor-interval)) (delay (plist-get styles :blink-cursor-delay))) + (setq cursory-last-selected-preset preset) (if local (setq-local cursor-type type cursor-in-non-selected-windows type-no-select