diff --git a/lua/guid.lua b/lua/guid.lua index 810cd82..1075da2 100644 --- a/lua/guid.lua +++ b/lua/guid.lua @@ -69,7 +69,7 @@ local function guid_generate() -- Set the two most significant bits (bits 6 and 7) of the -- clock_seq_hi_and_reserved to zero and one, respectively. - bytes[9] = bit.band(bit.bor(bytes[9], 0x80), 0x8f) + bytes[9] = bit.band(bit.bor(bytes[9], 0x80), 0xbf) -- Set the four most significant bits (bits 12 through 15) of the -- time_hi_and_version field to the 4-bit version number. diff --git a/plugin/guid.lua b/plugin/guid.lua index a31e99f..8337dba 100644 --- a/plugin/guid.lua +++ b/plugin/guid.lua @@ -18,6 +18,8 @@ if not vim.g.guid then guid.guid_object() end + math.randomseed(os.time()) + vim.api.nvim_create_user_command('GuidFormat', format, {nargs = '?'}) vim.api.nvim_create_user_command('GuidInsert', insert, {nargs = '?'}) vim.api.nvim_create_user_command('GuidObject', object, {})