diff options
| author | Alvaro Muñoz <pwntester@github.com> | 2020-10-08 23:45:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-08 17:45:11 -0400 |
| commit | c6716a5f6a496c1eba637e100136f9466b313c9e (patch) | |
| tree | a00fa29f230ff42e49f1e1c5320a16e1d073476e /lua/telescope | |
| parent | 04fe97d40dc17b7c1a04a23f10dbe69ac37e9736 (diff) | |
fix picking height as width (#157)
Diffstat (limited to 'lua/telescope')
| -rw-r--r-- | lua/telescope/pickers/layout_strategies.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lua/telescope/pickers/layout_strategies.lua b/lua/telescope/pickers/layout_strategies.lua index b43466c..f7d6215 100644 --- a/lua/telescope/pickers/layout_strategies.lua +++ b/lua/telescope/pickers/layout_strategies.lua @@ -140,9 +140,8 @@ 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, columns, lines) - local width = resolve.resolve_width(self.window.width)(self, columns, lines) - + local height = resolve.resolve_height(self.window.results_height)(self, lines) + local width = resolve.resolve_width(self.window.width)(self, columns) local max_results = (height > lines and lines or height) local max_width = (width > columns and columns or width) @@ -216,7 +215,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 |
