Skip to content

Conversation

benbrittain
Copy link

I was looking for a way to get similar behavior to -X with less, where the buffer stays on screen after exit.

@AMythicDev AMythicDev added O-static Static output displayed O-dynamic Dynamic output I-api Internal API change X-api-add Addition to the external api; No risk of downstream breakage labels Feb 11, 2024
@AMythicDev
Copy link
Owner

Could you please fix the code issues pointed by the CI so that I can further test it?

@benbrittain benbrittain mentioned this pull request Feb 12, 2024
@AMythicDev
Copy link
Owner

AMythicDev commented Feb 21, 2024

@benbrittain So I was busy for a while and I didn't get time to review this properly. Although you did most of the part correctly, you missed the mark in the actual implementation. The change that you did to cleanup() function causes the alternate screen to stay even after the pager is closed.

The alternate screen is meant to show complex UIs on the terminal without polluting the canonical screen whereas shells always run in the canonical screen. Its the sole responsibility of a program to start as well as exit the alternate screen so that the shell can continue running in the canonical screen.

By your approach we are not exiting the alternate screen and hence after quitting, the the shell continues to run in the alternate screen. This is an absolutely weird behavior and just a broken way to achieve the thing that you want. So I am not taking this right now until there's a better way of achieving the same effect or I get some more compelling reason to accept this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-api Internal API change O-dynamic Dynamic output O-static Static output displayed X-api-add Addition to the external api; No risk of downstream breakage

Projects

Status: In Progress ⚒️

Development

Successfully merging this pull request may close these issues.

2 participants