Skip to content

Commit 5262736

Browse files
committed
Set math.randomseed before generating sponsor message
As explained in the docstring to `nfnl.core/rand`: > You must have a random seed set before running this: > `(math.randomseed (os.time))` At present, Conjure does not do this and as a result the sponsor message is not selecting a random sponsor (unless the user happens to call `math.randomseed` within their Neovim environment). This commit adds the call recommended in the docstring.
1 parent 6770556 commit 5262736

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

fnl/conjure/log.fnl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
(vim.treesitter.stop buf)
5454
(tset vim.bo buf :syntax "on"))
5555

56+
(math.randomseed (os.time))
5657
(vim.api.nvim_buf_set_lines
5758
buf 0 -1 false
5859
[(str.join [(client.get :comment-prefix)

lua/conjure/log.lua

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)