diff --git a/lua/toggleterm/terminal.lua b/lua/toggleterm/terminal.lua index 86223463..f8c5690e 100644 --- a/lua/toggleterm/terminal.lua +++ b/lua/toggleterm/terminal.lua @@ -33,6 +33,7 @@ local function get_comment_sep() return is_windows and is_cmd(vim.o.shell) and " local function get_newline_chr() local shell = config.get("shell") + if type(shell) == "function" then shell = shell() end return is_windows and (is_pwsh(shell) and "\r" or "\r\n") or "\n" end