From f8a67765f548dc3763e2ffbb96fb41c339083fef Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Sun, 20 Mar 2022 10:26:51 +0000 Subject: [PATCH] fix: default `layout_config` to `{}` on `cycle_layout` actions (#1796) --- lua/telescope/actions/layout.lua | 4 ++-- 1 file 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