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

Is lf supposed to clear screen when switching to shell? #586

Closed
ivanp7 opened this issue Mar 4, 2021 · 7 comments
Closed

Is lf supposed to clear screen when switching to shell? #586

ivanp7 opened this issue Mar 4, 2021 · 7 comments
Labels

Comments

@ivanp7
Copy link
Contributor

ivanp7 commented Mar 4, 2021

I have updated to r21 and have noticed that shell opened from lf is always fresh (without older output), which hasn't been happening before (I could execute some commands, launch lf, switch to shell and see previous terminal contents). Is this supposed to happen, or is this a bug?

@gokcehan
Copy link
Owner

gokcehan commented Mar 4, 2021

@ivanp7 There is also previous ui drawings left in the terminal history. This was not intentional and we should mark this as a bug.

It is possible that this issue is related to the extra error we started receiving in our log files as mentioned in #480 . I think maybe somehow we can't switch to alternate screen for ui drawings after ui suspend/resume. I can also reproduce this on tcell mouse demo so it is possible that a fix requires a change in tcell as well.

@gokcehan gokcehan added the bug label Mar 4, 2021
@ivanp7
Copy link
Contributor Author

ivanp7 commented Mar 4, 2021

Yeah, it looks like the problem is related to alternate screen. Also, I observed this behavior in Linux virtual terminals before r21, but thought it is not lf issue.

@gokcehan
Copy link
Owner

gokcehan commented Mar 5, 2021

@ivanp7 Linux virtual terminal does not support alternate screen as far as I know so there is nothing much we can do about it. Other terminal programs also leaves ui artifacts after exiting. I think maybe there is only a difference for clearing the screen or not after exiting.

This issue indeed turned out to be an alternate screen issue. I think there is an easy fix for it. I have send it as a PR to the upstream as gdamore/tcell#439 . Let's see how it goes.

@ivanp7
Copy link
Contributor Author

ivanp7 commented Mar 6, 2021

@gokcehan Good job, thank you!

@gokcehan
Copy link
Owner

@ivanp7 It looks like it might take a while for the patch to be merged and this seems like an annoying issue so I have switched to a local fork and this should now be working as expected in our master branch.

@roachsinai
Copy link

@gokcehan works well use aur lf-git for now, thanks!

@ivanp7
Copy link
Contributor Author

ivanp7 commented Mar 30, 2021

@gokcehan Wow, very nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants