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!).
This commit is contained in:
Marty Oehme 2023-06-22 12:32:12 +02:00
parent 06e0cca640
commit 315e38cb24
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -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()