KevinSilvester/wezterm-config

a error happened in windows system

Closed this issue · 2 comments

callback error stack traceback: [C]: in metamethod 'index' C:\Users\shuhai\.config\wezterm/config\bindings.lua:93: in main chunk [C]: in function 'require' [string "C:\Users\shuhai\.config\wezterm\wezterm.lua"]:12: in main chunk caused by:InputSelectoris not a valid KeyAssignment variant. There are too many alternatives to list here; consult the documentation!

This is just a guess, but I think the version of wezterm on your machine is too old for this config.

InputSelector is a feature that was added in version 20230408-112425-69ae8472.

Additionally, the fuzzy_description field that I used for the backdrops keybinding was only added as an InputSelector parameter since version 20240127-113634-bbcac864

{
key = [[/]],
mods = mod.SUPER_REV,
action = act.InputSelector({
title = 'Select Background',
choices = backdrops:choices(),
fuzzy = true,
fuzzy_description = 'Select Background: ',
action = wezterm.action_callback(function(window, _pane, idx)
---@diagnostic disable-next-line: param-type-mismatch
backdrops:set_img(window, tonumber(idx))
end),
}),
},

A quick update should resolve the issue.

Thanks. After upgrading the version of Wezterm, this issue has been resolved.