From 0b6081d4273971e926249659ce6fff9ac641b754 Mon Sep 17 00:00:00 2001 From: cryptocode Date: Wed, 29 May 2024 15:12:51 +0200 Subject: [PATCH] scrollback: Include active area when writing scrollback to file Writing scrollback to file is, among other usecases, an interrim solution for searching. Status quo is to only write history pages, and not the active area. This PR proposes that the scrollback write includes the active area, which I think is more useful. For example, you can then do less +G if you have long log output and then page and reverse-search through all of it. It's a bit surprising if the active area is missing. --- src/Surface.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index 88f6e18f0..c2ac81240 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -3166,7 +3166,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool // the file and write the empty file to the pty so that this // command always works on the primary screen. const pages = &self.io.terminal.screen.pages; - if (pages.getBottomRight(.history)) |br| { + if (pages.getBottomRight(.active)) |br| { const tl = pages.getTopLeft(.history); try self.io.terminal.screen.dumpString( file.writer(),