Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

tui: use alternate screen to not pollute output and prevent backscroll #13

Merged
merged 1 commit into from
May 9, 2020

Conversation

Alphare
Copy link

@Alphare Alphare commented May 8, 2020

No description provided.

@Alphare
Copy link
Author

Alphare commented May 8, 2020

Note: maybe we should use a drop guard of some kind to trigger the exit of this alternate screen and raw mode, but that's for another PR

@vamolessa
Copy link
Owner

Ok, this gonna sound funny, but I actually like it this way ahhaah

Every now and then I exit verco after using a log command to then run a cli command using info that was displayed on screen (such as commit hashes, etc).

What do you think?

@Alphare
Copy link
Author

Alphare commented May 8, 2020

Then it should be a config option I guess!

I understand your use case, but I think I'm not the only one with that need. AFAICT there is no config file yet, am I wrong?

@vamolessa
Copy link
Owner

There is no config for now. A flag makes sense (either through cli param or config file). Not yet sure which one should be the default!

@Alphare
Copy link
Author

Alphare commented May 8, 2020

I think most people expect a TUI to enter an alternate screen, like vim, less, htop, etc. but I may be biased.

Would you be open to adding a config file? In a TOML format I suppose?

@vamolessa
Copy link
Owner

I really liked the idea of a small dependency count project.
At the same time, I understand the value it would bring (also trying to think of what other configs could enter the "vercorc").

Anyways, I think you're right regarding the alternate screen, it should be the default.
To deal with my use case, maybe we could add a command to copy the hash of a commit and then there would be no need for a config file (at least for now?).

@Alphare
Copy link
Author

Alphare commented May 8, 2020

You can use shift+mouse1 to select, I guess?

I also see the value in a low-dependency project, but a means of configuration is far from code bloat.

@vamolessa vamolessa merged commit 56ee129 into vamolessa:master May 9, 2020
@Alphare Alphare deleted the alternate-screen branch May 9, 2020 17:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants