Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lua/iron/lowlevel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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, "\r"))
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})
Expand Down