diff options
| author | Dave Lage <rockerboo@gmail.com> | 2020-10-08 17:59:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-08 17:59:46 -0400 |
| commit | 27baff48d5f1de12c2e1b51fa880c4bdc5d0e83e (patch) | |
| tree | 9f68e3e2ed2a3b7fd0307ff45f32af3bd8af8da4 /lua | |
| parent | a2ef5298ab27ac7153c3a9200453e1135c53b38a (diff) | |
Revert "fix picking height as width (#157)" (#158)
This reverts commit c6716a5f6a496c1eba637e100136f9466b313c9e.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/pickers/layout_strategies.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lua/telescope/pickers/layout_strategies.lua b/lua/telescope/pickers/layout_strategies.lua index f7d6215..b43466c 100644 --- a/lua/telescope/pickers/layout_strategies.lua +++ b/lua/telescope/pickers/layout_strategies.lua @@ -140,8 +140,9 @@ layout_strategies.center = function(self, columns, lines) local prompt = initial_options.prompt -- This sets the height/width for the whole layout - local height = resolve.resolve_height(self.window.results_height)(self, lines) - local width = resolve.resolve_width(self.window.width)(self, columns) + local height = resolve.resolve_height(self.window.results_height)(self, columns, lines) + local width = resolve.resolve_width(self.window.width)(self, columns, lines) + local max_results = (height > lines and lines or height) local max_width = (width > columns and columns or width) @@ -215,7 +216,7 @@ layout_strategies.vertical = function(self, max_columns, max_lines) -- Height local height_padding = math.max( - 1, + 1, resolve.resolve_height(layout_config.height_padding or 3)(self, max_columns, max_lines) ) local picker_height = max_lines - 2 * height_padding |
