summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-06 06:24:54 +0200
committerThanos Apollo <[email protected]>2024-02-06 06:25:17 +0200
commiteb6011d82e0f334f167f525f8759f2d50859c954 (patch)
treefcc0089935811ea6dac77469715a1a3a1105be38 /gnosis.el
parent47b8c3190bf40acc13226aab37d3121e7d932af4 (diff)
gnosis-display-hint: adjust for when hint is nil
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index b4d2e44..e5d3a78 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -266,10 +266,11 @@ SUCCESS is t when user-input is correct, else nil"
(defun gnosis-display-hint (hint)
"Display HINT."
- (goto-char (point-max))
- (insert
- (propertize "\n\n-----\n" 'face 'gnosis-face-seperator)
- (propertize hint 'face 'gnosis-face-hint)))
+ (let ((hint (or hint "")))
+ (goto-char (point-max))
+ (insert
+ (propertize "\n\n-----\n" 'face 'gnosis-face-seperator)
+ (propertize hint 'face 'gnosis-face-hint))))
(cl-defun gnosis-display-cloze-reveal (&key (cloze-char gnosis-cloze-string) replace (success t) (face nil))
"Replace CLOZE-CHAR with REPLACE.