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 d4a07465bf
commit a2f3fe87c3
Signed by: Marty
GPG Key ID: EDBF2ED917B2EF6A
1 changed files with 1 additions and 1 deletions

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