Skip to content

Commit 1d66cdd

Browse files
authored
Update run.lua
1 parent ea65778 commit 1d66cdd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/run.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local config = {
1414
}
1515

1616
local function random_char()
17-
local characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*)(-=][\';\"/.,_+}{|:?><"
17+
local characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
1818
local random_index = math.random(1, string.len(characters))
1919
local picked_character = string.sub(characters, random_index, random_index)
2020
return picked_character
@@ -32,7 +32,8 @@ function M.run()
3232
vim.cmd(config.split_cmd)
3333
vim.cmd("enew")
3434
local buf = vim.api.nvim_get_current_buf()
35-
vim.api.nvim_buf_set_name(buf, "crunner: " .. name .. "." .. ext .. "_" .. random_char() .. random_char())
35+
local random_chars = random_char() .. random_char() .. random_char()
36+
vim.api.nvim_buf_set_name(buf, "crunner: " .. name .. "." .. ext .. "_" .. random_chars)
3637
vim.api.nvim_buf_set_option(buf, "buftype", "nofile")
3738
vim.api.nvim_buf_set_option(buf, "bufhidden", "hide") -- hide on close
3839
vim.api.nvim_buf_set_option(buf, "buflisted", false) -- not in tabline

0 commit comments

Comments
 (0)