Skip to content

Commit

Permalink
fix(wezterm): Only configure direction keys if present in user config…
Browse files Browse the repository at this point in the history
…uration
  • Loading branch information
mrjones2014 committed May 30, 2024
1 parent 15948c6 commit d5edff0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions plugin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ local function apply_to_config(config_builder, plugin_config)
if plugin_config then
_smart_splits_wezterm_config.direction_keys = plugin_config.direction_keys
or _smart_splits_wezterm_config.direction_keys
-- update the direction_keys mappings to reflect configured ones
direction_keys = {} -- reset the direction_keys table to overwrite defaults
for i, v in ipairs(directions) do
local key = plugin_config.direction_keys[i]
direction_keys[key] = v
if plugin_config.direction_keys then
-- update the direction_keys mappings to reflect configured ones
direction_keys = {} -- reset the direction_keys table to overwrite defaults
for i, v in ipairs(directions) do
local key = plugin_config.direction_keys[i] or _smart_splits_wezterm_config.direction_keys[i]
direction_keys[key] = v
end
end
if plugin_config.modifiers then
_smart_splits_wezterm_config.modifiers.move = plugin_config.modifiers.move
Expand Down

0 comments on commit d5edff0

Please sign in to comment.