From 686fef3171ac0732b31122d5830998f2c610ffc5 Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Tue, 17 Oct 2023 14:21:24 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Maximilian Dietrich --- lua/smart-splits/config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/smart-splits/config.lua b/lua/smart-splits/config.lua index 27dbe1a..15f38e8 100644 --- a/lua/smart-splits/config.lua +++ b/lua/smart-splits/config.lua @@ -83,8 +83,8 @@ function M.set_default_multiplexer() -- because you aren't in any terminal, you're in a Neovim GUI local current_ui = vim.tbl_filter(function(ui) return ui.chan == 1 - end, vim.api.nvim_list_uis())[0] - if not current_ui.stdin_tty and not current_ui.stdout_tty then + end, vim.api.nvim_list_uis())[1] + if current_ui and not current_ui.stdin_tty and not current_ui.stdout_tty then config.multiplexer_integration = false return nil end