From 557e5db4997f8e2bd3a13bbc6fffdca15d1db934 Mon Sep 17 00:00:00 2001 From: Ky9oss Date: Thu, 23 Oct 2025 02:44:24 +0800 Subject: [PATCH 1/2] fix blanklines --- lua/iron/lowlevel.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/iron/lowlevel.lua b/lua/iron/lowlevel.lua index 1588196..5cc7355 100644 --- a/lua/iron/lowlevel.lua +++ b/lua/iron/lowlevel.lua @@ -5,6 +5,7 @@ local fts = require("iron.fts") local providers = require("iron.providers") local format = require("iron.fts.common").format local view = require("iron.view") +local is_windows = require("iron.util.os").is_windows --- Low level functions for iron -- This is needed to reduce the complexity of the user API functions. @@ -184,7 +185,11 @@ ll.send_to_repl = function(meta, data) --TODO check vim.api.nvim_chan_send --TODO tool to get the progress of the chan send function - vim.fn.chansend(meta.job, dt) + if is_windows then + vim.fn.chansend(meta.job, table.concat(dt, "\n")) + else + vim.fn.chansend(meta.job, dt) + end if window ~= -1 then vim.api.nvim_win_set_cursor(window, {vim.api.nvim_buf_line_count(meta.bufnr), 0}) From 8bd354fabc145e0bf4304fac4d02a85b76c27251 Mon Sep 17 00:00:00 2001 From: Ky9oss Date: Thu, 23 Oct 2025 03:28:19 +0800 Subject: [PATCH 2/2] update --- lua/iron/lowlevel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/iron/lowlevel.lua b/lua/iron/lowlevel.lua index 5cc7355..5cf52e4 100644 --- a/lua/iron/lowlevel.lua +++ b/lua/iron/lowlevel.lua @@ -186,7 +186,7 @@ ll.send_to_repl = function(meta, data) --TODO check vim.api.nvim_chan_send --TODO tool to get the progress of the chan send function if is_windows then - vim.fn.chansend(meta.job, table.concat(dt, "\n")) + vim.fn.chansend(meta.job, table.concat(dt, "\r")) else vim.fn.chansend(meta.job, dt) end