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
11 changes: 6 additions & 5 deletions lua/scnvim/sclang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ local on_stdout = function()
local str = table.concat(stack, '')
local got_line = vim.endswith(str, '\n')
if got_line then
local lines = vim.gsplit(str, '\n')
for line in lines do
if line ~= '' then
M.on_output(line)
end
local lines = vim.split(str, '\n')
if #lines > 0 and lines[#lines] == "" then
table.remove(lines)
end
for _, line in pairs(lines) do
M.on_output(line)
end
stack = { '' }
end
Expand Down