From bbd1bad0cd14b3fb341072064923fe1856168ee9 Mon Sep 17 00:00:00 2001 From: Asror Date: Mon, 31 Jul 2023 16:36:03 -0400 Subject: [PATCH] fix: call shell function in `get_newline_chr()` fixes(#466); --- lua/toggleterm/terminal.lua | 1 + 1 file changed, 1 insertion(+) 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