mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 05:06:24 +03:00
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 <super+shift+j> 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.
This commit is contained in:
@ -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(),
|
||||
|
Reference in New Issue
Block a user