diff options
| author | Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> | 2022-03-20 10:26:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-20 11:26:51 +0100 |
| commit | f8a67765f548dc3763e2ffbb96fb41c339083fef (patch) | |
| tree | 55b21d9b454198668d2b9f6a36537bc21e7337f1 /lua | |
| parent | a36a813d5d031e6f5d52b74986915e68130febd9 (diff) | |
fix: default `layout_config` to `{}` on `cycle_layout` actions (#1796)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/actions/layout.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/actions/layout.lua b/lua/telescope/actions/layout.lua index 7131823..93f74db 100644 --- a/lua/telescope/actions/layout.lua +++ b/lua/telescope/actions/layout.lua @@ -116,11 +116,11 @@ local get_cycle_layout = function(dir) local new_layout = picker.__cycle_layout_list[picker.__layout_index] if type(new_layout) == "string" then picker.layout_strategy = new_layout - picker.layout_config = nil + picker.layout_config = {} picker.previewer = picker.all_previewers and picker.all_previewers[1] or nil elseif type(new_layout) == "table" then picker.layout_strategy = new_layout.layout_strategy - picker.layout_config = new_layout.layout_config + picker.layout_config = new_layout.layout_config or {} picker.previewer = (new_layout.previewer == nil and picker.all_previewers[picker.current_previewer_index]) or new_layout.previewer else |
