fix(osc52): do not use 'vim.iter' (#27218)

Problem: Using 'vim.iter' loads it during startup.

Solution: Do not use 'vim.iter'.
This commit is contained in:
Evgeni Chasnovski 2024-01-26 20:06:13 +02:00 committed by GitHub
parent 28d1640dd6
commit a9df0c5ce6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,10 @@
local tty = vim.iter(vim.api.nvim_list_uis()):any(function(ui) local tty = false
return ui.chan == 1 and ui.stdout_tty for _, ui in ipairs(vim.api.nvim_list_uis()) do
end) if ui.chan == 1 and ui.stdout_tty then
tty = true
break
end
end
if not tty or vim.g.clipboard ~= nil or vim.o.clipboard ~= '' or not os.getenv('SSH_TTY') then if not tty or vim.g.clipboard ~= nil or vim.o.clipboard ~= '' or not os.getenv('SSH_TTY') then
return return