diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index b353c8a6ac..95d4e41ef2 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -324,7 +324,7 @@ function Picker:new(opts) cache_picker = config.resolve_table_opts(opts.cache_picker, vim.deepcopy(config.values.cache_picker)), - __scrolling_limit = tonumber(vim.F.if_nil(opts.temp__scrolling_limit, 250)), + scrolling_limit = tonumber(vim.F.if_nil(opts.scrolling_limit, 250)), __locations_input = vim.F.if_nil(opts.__locations_input, false), }, self) @@ -571,11 +571,8 @@ function Picker:find() vim.fn.prompt_setprompt(self.prompt_bufnr, prompt_prefix) self:_reset_prefix_color() - -- TODO: This could be configurable in the future, but I don't know why you would - -- want to scroll through more than 10,000 items. - -- -- This just lets us stop doing stuff after tons of things. - self.max_results = self.__scrolling_limit + self.max_results = self.scrolling_limit vim.api.nvim_buf_set_lines(self.results_bufnr, 0, self.max_results, false, utils.repeated_table(self.max_results, "")) diff --git a/lua/tests/automated/pickers/live_grep_spec.lua b/lua/tests/automated/pickers/live_grep_spec.lua index 3471c9062f..6d88c64361 100644 --- a/lua/tests/automated/pickers/live_grep_spec.lua +++ b/lua/tests/automated/pickers/live_grep_spec.lua @@ -35,7 +35,7 @@ describe("builtin.live_grep", function() sorter = require("telescope.sorters").get_fzy_sorter(), layout_strategy = "center", cwd = "./lua/tests/fixtures/live_grep", - temp__scrolling_limit = 5, + scrolling_limit = 5, }, vim.json.decode [==[%s]==]) ) ]],