summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2021-10-31 17:02:38 +0100
committerGitHub <noreply@github.com>2021-10-31 17:02:38 +0100
commit0caec3d6e4d3c3c71339eb18a9aae7ed0f24badc (patch)
treeb07b7f20a20c023cfb2f060dc6924d52903e1a58
parentc08f95823d2c0367a8782d4ae7dbc9c04b1f9137 (diff)
Revert "break: changed the results window highlight to always be full width (#1312)" (#1398)
This reverts commit 3b9ac8edba8c1b4053c7f6ac8a4e78969cec66dd.
-rw-r--r--doc/telescope.txt7
-rw-r--r--lua/telescope/config.lua10
-rw-r--r--lua/telescope/pickers/highlights.lua9
3 files changed, 1 insertions, 25 deletions
diff --git a/doc/telescope.txt b/doc/telescope.txt
index 5835823..3e1c0c4 100644
--- a/doc/telescope.txt
+++ b/doc/telescope.txt
@@ -234,13 +234,6 @@ telescope.setup({opts}) *telescope.setup()*
Default: function that shows current count / all
- *telescope.defaults.hl_result_eol*
- hl_result_eol: ~
- Changes if the highlight for the selected item in the results
- window is always the full width of the window
-
- Default: true
-
*telescope.defaults.dynamic_preview_title*
dynamic_preview_title: ~
Will change the title of the preview window dynamically, where it
diff --git a/lua/telescope/config.lua b/lua/telescope/config.lua
index 7a1cab3..86d5bb0 100644
--- a/lua/telescope/config.lua
+++ b/lua/telescope/config.lua
@@ -321,16 +321,6 @@ append(
)
append(
- "hl_result_eol",
- true,
- [[
- Changes if the highlight for the selected item in the results
- window is always the full width of the window
-
- Default: true]]
-)
-
-append(
"dynamic_preview_title",
false,
[[
diff --git a/lua/telescope/pickers/highlights.lua b/lua/telescope/pickers/highlights.lua
index 6d89b78..e7b99e1 100644
--- a/lua/telescope/pickers/highlights.lua
+++ b/lua/telescope/pickers/highlights.lua
@@ -1,6 +1,5 @@
local a = vim.api
local log = require "telescope.log"
-local conf = require("telescope.config").values
local highlights = {}
@@ -70,13 +69,7 @@ function Highlighter:hi_selection(row, caret)
a.nvim_buf_clear_namespace(results_bufnr, ns_telescope_selection, 0, -1)
a.nvim_buf_add_highlight(results_bufnr, ns_telescope_selection, "TelescopeSelectionCaret", row, 0, #caret)
- a.nvim_buf_set_extmark(
- results_bufnr,
- ns_telescope_selection,
- row,
- #caret,
- { end_line = row + 1, hl_eol = conf.hl_result_eol, hl_group = "TelescopeSelection" }
- )
+ a.nvim_buf_add_highlight(results_bufnr, ns_telescope_selection, "TelescopeSelection", row, #caret, -1)
end
function Highlighter:hi_multiselect(row, is_selected)