diff options
| author | Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> | 2021-12-08 18:28:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-08 18:28:55 +0000 |
| commit | 914da77bb7528e72be602c0de7dbb0952839f06f (patch) | |
| tree | 0a9033b6212b75fcad66d2f4a4810c19cd00544d /lua/telescope/pickers/layout_strategies.lua | |
| parent | 6b1579741a0e8f1e0e63d0c6c364b968c157338e (diff) | |
fix: `bottom_pane` remove `results` border next to `prompt` (#1563)
Diffstat (limited to 'lua/telescope/pickers/layout_strategies.lua')
| -rw-r--r-- | lua/telescope/pickers/layout_strategies.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/telescope/pickers/layout_strategies.lua b/lua/telescope/pickers/layout_strategies.lua index 75ce032..12090b7 100644 --- a/lua/telescope/pickers/layout_strategies.lua +++ b/lua/telescope/pickers/layout_strategies.lua @@ -838,6 +838,12 @@ layout_strategies.bottom_pane = make_documented_layout( prompt.line = max_lines - results.height - (1 + bs) + 1 results.line = prompt.line + 1 preview.line = results.line + bs + if results.border == true then + results.border = { 0, 1, 1, 1 } + end + if type(results.title) == "string" then + results.title = { { pos = "S", text = results.title } } + end elseif layout_config.prompt_position == "bottom" then results.line = max_lines - results.height - (1 + bs) + 1 preview.line = results.line @@ -845,6 +851,9 @@ layout_strategies.bottom_pane = make_documented_layout( if type(prompt.title) == "string" then prompt.title = { { pos = "S", text = prompt.title } } end + if results.border == true then + results.border = { 1, 1, 0, 1 } + end else error("Unknown prompt_position: " .. tostring(self.window.prompt_position) .. "\n" .. vim.inspect(layout_config)) end |
