We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8148e9b commit cf031d2Copy full SHA for cf031d2
lua/scnvim/sclang.lua
@@ -27,11 +27,12 @@ local on_stdout = function()
27
local str = table.concat(stack, '')
28
local got_line = vim.endswith(str, '\n')
29
if got_line then
30
- local lines = vim.gsplit(str, '\n')
31
- for line in lines do
32
- if line ~= '' then
33
- M.on_output(line)
34
- end
+ local lines = vim.split(str, '\n')
+ if #lines > 0 and lines[#lines] == "" then
+ table.remove(lines)
+ end
+ for _, line in pairs(lines) do
35
+ M.on_output(line)
36
end
37
stack = { '' }
38
0 commit comments