From 59f5873199625304bf8350f0eb04ff45aee65f2f Mon Sep 17 00:00:00 2001 From: Jean-Luc Bastarache Date: Mon, 11 Oct 2021 12:00:28 -0400 Subject: [PATCH] fix: highlighting when `color_devicons=false` (#1328) --- lua/telescope/pickers.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 1996c38..9c59918 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -897,8 +897,10 @@ function Picker:entry_adder(index, entry, _, insert) end local set_ok, msg = pcall(vim.api.nvim_buf_set_lines, self.results_bufnr, row, row + offset, false, { display }) - if set_ok and display_highlights then - self.highlighter:hi_display(row, prefix, display_highlights) + if set_ok then + if display_highlights then + self.highlighter:hi_display(row, prefix, display_highlights) + end self:highlight_one_row(self.results_bufnr, self:_get_prompt(), display, row) end