powerline?
This commit is contained in:
@@ -36,31 +36,14 @@ M.config = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Send raw escape sequence to the terminal, bypassing neovim's terminal handling.
|
-- Send raw escape sequence to the terminal, bypassing neovim's terminal handling.
|
||||||
-- We use multiple fallback strategies to find a working method.
|
-- We spawn a shell process to write directly to the TTY, which bypasses neovim completely.
|
||||||
local function send_to_tty(str)
|
local function send_to_tty(str)
|
||||||
-- Strategy 1: Use nvim_chan_send to channel 2 (stderr)
|
-- Use printf in a subprocess - this writes directly to the terminal
|
||||||
-- This often bypasses neovim's terminal buffer processing
|
-- The subprocess inherits the TTY and can write to it directly
|
||||||
local ok = pcall(vim.api.nvim_chan_send, 2, str)
|
vim.fn.jobstart({ 'printf', '%s', str }, {
|
||||||
if ok then
|
detach = true,
|
||||||
return
|
on_exit = function() end,
|
||||||
end
|
})
|
||||||
|
|
||||||
-- Strategy 2: Write to stderr directly
|
|
||||||
-- stderr is typically unbuffered and may bypass neovim
|
|
||||||
ok = pcall(function()
|
|
||||||
io.stderr:write(str)
|
|
||||||
io.stderr:flush()
|
|
||||||
end)
|
|
||||||
if ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Strategy 3: Use terminfo/termcap passthrough if available
|
|
||||||
-- This is a last resort
|
|
||||||
pcall(function()
|
|
||||||
io.write(str)
|
|
||||||
io.flush()
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Send OSC 51 command to ZTerm for pane navigation
|
-- Send OSC 51 command to ZTerm for pane navigation
|
||||||
|
|||||||
Reference in New Issue
Block a user