From 50001d4965af3c95614b1423ab6d130068319cd9 Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Fri, 2 Jul 2021 07:50:55 +0100 Subject: fix: table number option extend (#947) * fix: prevent error when overriding tables with numbers Fixes #944 - refactor `config.smarter_depth_2_extend` - use `config.smarter_depth_2_extend` for setting `layout_config` in `Picker:new` * test: check that can override a table with a number for layout configuration --- lua/tests/automated/layout_strategies_spec.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lua/tests') diff --git a/lua/tests/automated/layout_strategies_spec.lua b/lua/tests/automated/layout_strategies_spec.lua index a4d2c50..f8f8b02 100644 --- a/lua/tests/automated/layout_strategies_spec.lua +++ b/lua/tests/automated/layout_strategies_spec.lua @@ -89,4 +89,14 @@ describe('layout_strategies', function() {horizontal={height=50}}, {horizontal={height=100}}, {height=120} ) + test_defaults_key("should handle user config overriding a table with a number", + 'height','horizontal',120, + {height={padding=5}},{height=120},{} + ) + + test_defaults_key("should handle user oneshot overriding a table with a number", + 'height','horizontal',120, + {},{height={padding=5}},{height=120} + ) + end) -- cgit v1.2.3