improve: support to customize the spinners (#2397)

This commit is contained in:
guanghechen
2025-07-02 18:54:41 +08:00
committed by GitHub
parent 8fde103734
commit 7aec52ff3e
5 changed files with 55 additions and 43 deletions

View File

@@ -44,47 +44,7 @@ function PromptInput:new(opts)
obj.close_on_submit = opts.close_on_submit or false
obj.win_opts = opts.win_opts
obj.default_value = opts.default_value
obj.spinner_chars = {
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
}
obj.spinner_chars = Config.windows.spinner.editing
obj.spinner_index = 1
obj.spinner_timer = nil
obj.spinner_active = false