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

reset terminal on exit #6

Open
jaeheum opened this issue Nov 4, 2019 · 22 comments
Open

reset terminal on exit #6

jaeheum opened this issue Nov 4, 2019 · 22 comments

Comments

@jaeheum
Copy link

jaeheum commented Nov 4, 2019

$ kitty --version
kitty 0.14.6 created by Kovid Goyal
$ termpdf.py --version
0.1.1

$ termpdf.py some.pdf
$ ls -l # no problem
$ vi

there is a all black rectangle residue of the pdf in the window, which i can't clear.

@jaeheum
Copy link
Author

jaeheum commented Nov 4, 2019

hittng M to draw a metadata box before exiting helps (no residue)

@dsanson
Copy link
Owner

dsanson commented Nov 7, 2019

Yes. I haven't figured out what is causing this residue. Did not know that showing the metadata first removed the residue. That's a helpful lead.

@andreas-bulling
Copy link

andreas-bulling commented Mar 4, 2020

Any news on this? I ran into the same problem on MacOS X with homebrew which, given that I use termpdf.py to show PDF attachments in neomutt, is pretty annoying.

Hitting M does NOT help in my case and neither does reset on the terminal. I have to close the terminal window.

@dsanson
Copy link
Owner

dsanson commented Mar 16, 2020

No, no progress. And yes, it is annoying.

@kovidgoyal
Copy link

kovidgoyal/kitty#2449

@andreas-bulling
Copy link

andreas-bulling commented Apr 17, 2020

(when) is this fix going to end up in the public kitty version (I am not familiar with the kitty release cycle and development process but given that it was committed already 30 days ago and there was a release in between I wonder).

Thanks @kovidgoyal for referring to the other issue and or fixing the issue!

@kovidgoyal
Copy link

It was released a while ago.

@andreas-bulling
Copy link

in which release version?

@kovidgoyal
Copy link

You click on a commit in github and it will tell you which release it
first appeared in.

@andreas-bulling
Copy link

I am using 0.17.2 but the problem is still there

@kovidgoyal
Copy link

Then its not the same issue.

@andreas-bulling
Copy link

Not fixed for me I am afraid

@jaeheum
Copy link
Author

jaeheum commented May 27, 2020

it's working for me with kitty 0.17.3 (both dark and light background) thanks

@dsanson
Copy link
Owner

dsanson commented May 27, 2020

@andreas-bulling I wonder if you are having a different problem, given that both this solution and the "view metadata before quitting" trick didn't work for you. Is your problem exactly as described by @jaeheum? After quitting termpdf, when you launch vim, you get an unmovable black box as residue, where the image once was?

@dsanson dsanson reopened this May 27, 2020
@andreas-bulling
Copy link

I am having the black box problem when using termpdf.py with neomutt: After opening an attachment in the console a black box is left that I can only get rid of by quitting kitty.

@jaeheum
Copy link
Author

jaeheum commented Jun 20, 2020

the problem is back with kitty 0.17.4.

@dsanson
Copy link
Owner

dsanson commented Jun 22, 2020

I do not have the issue in kitty 0.17.4, but I am not using neomutt. Can you try a few things to help narrow down the possible causes?

First, try:

> kitty +kitten diff img1.jpg img2.jpg
> vim

This is from the original bug report at kovidgoyal/kitty#2449. If that is still causing problems for you, then you should reopen that issue.

If that works fine, then maybe it has to do with the way that termpdf.py is closed after having been launched from neomutt. Does the problem arise when you just run termpdf.py directly, and not from neomutt?

@andreas-bulling
Copy link

@dsanson I tried the two-liner and I don't have any problem with the black box in this case. Also running termpdf.py directly doesn't cause and problem, i.e. it seems to be linked to neomutt.

@jaeheum
Copy link
Author

jaeheum commented Jun 22, 2020

@dsanson I am not using neomutt either. My usage is just termpdf.py file.pdf. As your kitty is behaving nicely, I'll have to debug mine more carefully. (There are other factors complicating the matter: on another machine with almost identical setup termpdf.py runs into fish vs screen size.) I will try to do more investigation later in the week.

@dsanson
Copy link
Owner

dsanson commented Jun 22, 2020

The fish/kitty screen size problem is resolved: fish-shell/fish-shell/issues/6994. But it hasn't made it into release yet, so you have to build from source.

@andreas-bulling
Copy link

I wonder, though, what the starting point is to figure out what's going on. Do you think I should file a bug report with neomutt or can you help with this?

@jaeheum
Copy link
Author

jaeheum commented Jun 26, 2020

With a few (but not all) pdf files I can reproduce the black residue problem.
However I can workaround the problem by running the kitty window in full-screen mode in a monitor with portrait mode.
Fortunately that's my preferred way of running kitty and termpdf.py :-)

fish 3.0.2
termpdf.py 0.1.1
kitty 0.17.4

That kitty vs fish problem was happening for another installation with fish 3.1.2 and I'll wait for fish 3.2. Thanks.

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

No branches or pull requests

4 participants