Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: When closing tig, do not clear the screen #1332

Open
JohanBzm opened this issue May 3, 2024 · 2 comments
Open

Feature request: When closing tig, do not clear the screen #1332

JohanBzm opened this issue May 3, 2024 · 2 comments
Labels
component:terminal Ncurses and terminal

Comments

@JohanBzm
Copy link

JohanBzm commented May 3, 2024

Using 'tig' as a pager is great, much better than 'less'. We're not speaking about 'more' at all.
Only, when using 'less', I can scroll to the position that interests me, and when I then terminate with entering 'q', only the bottom line of the window is redrawn with the bash prompt, the rest of the screen remains as 'less' has drawn it.
If I try the same with 'tig', the screen is cleared.

My use case: When composing some non-trivial 'git' command, eg. a diff between two commit IDs, I frequently need multiple aspects of a series of commits to be cut and pasted from 'git log' or sometimes other 'git' commands, so I scroll to the position, terminate 'less', and copy/paste from the output still on screen, and possibly "above" in the screen buffer, to compose the next command line. With 'tig' I need to use two windows - possible, but then only one window will be last to save the command history...

A configuration option to, upon leaving 'tig', leave the content of the screen as-is would be great.

@koutcher
Copy link
Collaborator

koutcher commented May 3, 2024

You can already get the result you are expecting if you disable the alternate screen capability of your terminal emulator or if you invoke Tig with TERM=xterm1 tig.

@JohanBzm
Copy link
Author

JohanBzm commented May 6, 2024

I was looking for an option like less -X, using a different terminal might be a possibility for some, but not always for me. I found one solution: Globally disabling the alternate screen is an option, at least in some circumstances.

@koutcher koutcher added the component:terminal Ncurses and terminal label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:terminal Ncurses and terminal
Projects
None yet
Development

No branches or pull requests

2 participants