Skip to content

Commit

Permalink
Added padding to results so highlight is full width of window
Browse files Browse the repository at this point in the history
  • Loading branch information
TC72 committed Oct 6, 2021
1 parent 6066033 commit fb8bdc7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/telescope/pickers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,12 @@ function Picker:set_selection(row)
local display, display_highlights = entry_display.resolve(self, entry)
display = caret .. display

local window_width = vim.api.nvim_win_get_width(self.results_win)
local display_length = string.len(display)
if display_length < window_width + 2 then
display = display .. string.rep(" ", window_width + 2 - display_length)
end

-- TODO: You should go back and redraw the highlights for this line from the sorter.
-- That's the only smart thing to do.
if not a.nvim_buf_is_valid(results_bufnr) then
Expand Down

0 comments on commit fb8bdc7

Please sign in to comment.