Clearing screen (cmd-k) creates empty scrollback #10288
Replies: 4 comments 6 replies
-
|
cmd+k is a keybind in ghostty bound to reading some forums online it seems that the behavior should be to clear everything including scrollback |
Beta Was this translation helpful? Give feedback.
-
|
What seems to work is clearing the screen twice with cmd-k. This removes the created scrollback. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I found that this issue only occurs when Ghostty is used together with Fish. And I believe I have found a workaround. You can inspect Fish’s default action for bind --preset ctrl-l 'status test-terminal-feature scroll-content-up && commandline -f scrollback-push' clear-screenThe problem lies in: status test-terminal-feature scroll-content-up && commandline -f scrollback-pushSpecifically, Ghostty reports support for As a temporary workaround, you can override Fish’s default behavior by adding the following line to your bind ctrl-l clear-screenThis will make I’m not sure if this is a bug in Ghostty, but at least for now, this workaround works effectively for me. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
When clearing the screen with cmd-k, empty scrollback is created above the prompt.
I noticed this because I sometimes scroll up quickly (using the touchpad) to see the beginning of the scrollback, then cmd-k to clear the screen. After the screen is cleared, the inertia scroll is still scrolling up, so I see the empty scrollback.
This bisects to 1fdc0c0.
Expected Behavior
When clearing the screen with cmd-k, empty scrollback shouldn't be created above the prompt.
Actual Behavior
When there is content on the screen, clearing the screen with cmd-k creates empty scrollback with height equivalent to the content that was on the screen.
Screen recording
Screen.Recording.mp4
Reproduction Steps
lsorecho hi)Ghostty Logs
No response
Ghostty Version
OS Version Information
macOS Sequoia 15.7.3
Minimal Ghostty Configuration
# emptyAdditional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.Beta Was this translation helpful? Give feedback.
All reactions