From d870ca4c1f2e9a98fa4c46cbf21f732e8076e6e7 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 31 Aug 2023 18:37:49 -0500 Subject: [PATCH] feat(wezterm): error when wezterm is unable to get scrollback --- dots/.config/wezterm/config/events.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dots/.config/wezterm/config/events.lua b/dots/.config/wezterm/config/events.lua index ed43e45e..f662c352 100644 --- a/dots/.config/wezterm/config/events.lua +++ b/dots/.config/wezterm/config/events.lua @@ -5,6 +5,10 @@ wezterm.on("trigger-nvim-with-scrollback", function(window, pane) local scrollback = pane:get_lines_as_text(scrollback_lines) local name = os.tmpname() 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:flush() f:close()