From 315e38cb248276e44dc38c593185f6201edf72bc Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 22 Jun 2023 12:32:12 +0200 Subject: [PATCH] wezterm: Copy logical lines from scrollback buffer When copying the recent buffer into an editor for copying/editing/doing whatever with, we should copy *logical* lines since that is generally what we want to be working with instead of arbitrary line-breaks. Wezterm helpfully provides us this possibility (thanks, Wez!). --- terminal/.config/wezterm/events.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal/.config/wezterm/events.lua b/terminal/.config/wezterm/events.lua index 2dbccf2..853aed8 100644 --- a/terminal/.config/wezterm/events.lua +++ b/terminal/.config/wezterm/events.lua @@ -37,7 +37,7 @@ local function setup() -- Retrieve the current scrollback text and send to editor wezterm.on("edit-scrollback", function(window, pane) - local viewport_text = pane:get_lines_as_text(10000) + local viewport_text = pane:get_logical_lines_as_text(10000) -- Create a temporary file to pass to vim local name = os.tmpname()