kingToolbox / kingToolbox/WindTerm

Alternate screen and scrollback behavior

Open
#3,642 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
32.3k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

first of, i love this software, it is neat and checks a lot of use cases that i might have used multiple applications, to achieve the same goals
but one issue that's been bothering me is the scrollback, and i will share images with the issues
1. cls/clear commands don't clear the terminal, they clear some parts, most of the time, the line where the clear command that was written, but nothing beyond that, sometimes it works as intended
2. terminal apps that rely on alternate screen, like tui apps or similar, have a hard time dealing with the scroll back, especially during event (more on that later)
3. scrollback is stubborn, and affects the key event, as if the terminal is registering the cursor to be outside of the app, scrolling results in either of four cases, scrolling inside the app (intended) , scrolling outside the terminal app, through the scrollback, no scrolling, escape characters (more on escape characters later)

all these issues combined results in this

Image

Image

now this behavior is inconsistent, sometimes the apps run in alternate screen, taking up the entire buffer, sometime what you get to see in these images (events and failures re-rendering the terminal app alongside its previous state, commands, etc)

and some times the behavior completely glitches out, where key, or mouse events would be translated into escape characters, the application would turn into escape characters, etc, which might happen if i use misconfigured tmux, or msedit on a linux machine over ssh, but these behaviors happen on all terminals, local ones like cmd and powershell, and remote ones over ssh

and these issues range across all terminal apps, nano, nvim, vim, msedit, yazi, etc
i don't know if this behavior is intentional , but i can't find a way to disable it

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the scrollback and alternate-screen behavior with nano, nvim, vim, msedit, and yazi, both locally and over SSH, using the reported clear/cls and scrolling cases. Compare the results across cmd, PowerShell, and the remote setups; done means alternate-screen applications render consistently, scrolling stays in the intended buffer, and key or mouse events are not emitted as escape characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.