Skip to content

Commit

Permalink
fix: set math.randomseed to ensure a different animal in the
Browse files Browse the repository at this point in the history
status line every start
  • Loading branch information
jmbuhr committed Mar 13, 2024
1 parent 9871d92 commit b2c0854
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/config/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ let g:currentmode={
\}
]]

vim.opt.statusline = '%{%g:currentmode[mode()]%} %{%reg_recording()%} %* %t | %y | %* %= c:%c l:%l/%L %p%% ' .. animals[math.random(#animals)] .. ' %*'
math.randomseed(os.time())
local i = math.random(#animals)
vim.opt.statusline = '%{%g:currentmode[mode()]%} %{%reg_recording()%} %* %t | %y | %* %= c:%c l:%l/%L %p%% ' .. animals[i] .. ' %*'

-- hide cmdline when not used
vim.opt.cmdheight = 1
Expand Down

0 comments on commit b2c0854

Please sign in to comment.