Skip to content

Commit f04ab73

Browse files
authored
fix(preview): line splitting errors with timeout = false (#3662)
1 parent 8eb2d60 commit f04ab73

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lua/telescope/previewers/utils.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ local CHECK_TIME_INTERVAL = 200
248248
function utils.timed_split_lines(s, opts)
249249
local lines = {}
250250
local line_start = 1
251+
local timeout = opts.preview.timeout or math.huge
251252

252253
for i = 1, #s do
253254
local ch = s:byte(i)
@@ -264,7 +265,7 @@ function utils.timed_split_lines(s, opts)
264265

265266
if i % CHECK_TIME_INTERVAL == 0 then
266267
local diff_time = (vim.uv.hrtime() - opts.start_time) / 1e6
267-
if diff_time > opts.preview.timeout then
268+
if diff_time > timeout then
268269
return
269270
end
270271
end

0 commit comments

Comments
 (0)