feat(wezterm): error when wezterm is unable to get scrollback
This commit is contained in:
parent
fe9544c23f
commit
d870ca4c1f
@ -5,6 +5,10 @@ wezterm.on("trigger-nvim-with-scrollback", function(window, pane)
|
|||||||
local scrollback = pane:get_lines_as_text(scrollback_lines)
|
local scrollback = pane:get_lines_as_text(scrollback_lines)
|
||||||
local name = os.tmpname()
|
local name = os.tmpname()
|
||||||
local f = io.open(name, "w+")
|
local f = io.open(name, "w+")
|
||||||
|
if f == nil then
|
||||||
|
window:toast_notification("Wezterm", "Unable to get scrollback!", nil, 4000)
|
||||||
|
return
|
||||||
|
end
|
||||||
f:write(scrollback)
|
f:write(scrollback)
|
||||||
f:flush()
|
f:flush()
|
||||||
f:close()
|
f:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user