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:
parent
d4a07465bf
commit
a2f3fe87c3
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ local function setup()
|
||||||
|
|
||||||
-- Retrieve the current scrollback text and send to editor
|
-- Retrieve the current scrollback text and send to editor
|
||||||
wezterm.on("edit-scrollback", function(window, pane)
|
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
|
-- Create a temporary file to pass to vim
|
||||||
local name = os.tmpname()
|
local name = os.tmpname()
|
||||||
|
|
Loading…
Reference in a new issue