Skip to content

Conversation

@MillerApps
Copy link
Contributor

@Achno
Here we go again! It's pretty much what the other PR had, just with the switch you made to use "golang.org/x/term". Hopefully it works on your end, I only tested in Ghostty 1.1.2 on macOS Sequoia 15.3.1

@Achno
Copy link
Owner

Achno commented Feb 25, 2025

@MillerApps

Can you remove golang.org/x/sys from your go.sum ? its still present there.
I will test this and merge it when i have some time

@MillerApps
Copy link
Contributor Author

MillerApps commented Feb 25, 2025

@Achno it seems it's a dependency of golang.org/x/term look here

Looking at the code for golang.org/x/sys they use build constraints/tags. Since we no longer use any Unix specific code it should build for windows based on my research.

@Achno
Copy link
Owner

Achno commented Feb 25, 2025

@MillerApps

Yup it builds just fine for windows, one thing i noticed is that it's still slower than kitten icat by a not marginal amount but we will figure that in the future.

The thing is another problem has arisen, here is the image im using for testing. The left is Konsole( Same thing happens on Ghostyy) and the right is Kitty with kitten icat

Screenshot_20250226_000953

Do you see that insane amount of artifacts or whatever those rectangles are? On your other PR when i was testing with the same image yesterday i dont remember this happening.

Man this addition is like a hydra, you cut off 1 head and 2 more spawn to take its place

@MillerApps
Copy link
Contributor Author

MillerApps commented Feb 25, 2025

@Achno I see them on your screenshot but not on my machine, so I'll be unable to debug that as it's not seemingly reproducible on my end.

CleanShot 2025-02-25 at 17 20 55

Note

The cubes (artifacts) on mine are a shader I use with Ghostty

Yes very much seems like its a bit of a hydra!

I think the best bet here would be to merge the PR and then you or someone else can debug on the the img-preview branch. As it stands on my end everything seems fine.

@Achno
Copy link
Owner

Achno commented Feb 25, 2025

@MillerApps

as it's not seemingly reproducible on my end.

I don't even wish this on my worst enemy. I guess a lot more debugging is needed in my end, i will try to figure this out.
I will leave the estimation when this feature will be merged with a good old spongebob meme.

Screenshot_20250226_004958

@MillerApps
Copy link
Contributor Author

@Achno, like I said, I'd at least merge to this feature branch to do testing and possibly pick another person who can help. It's definitely been fun and frustrating, but I think it's a must-have feature at this point. Sorry about it kind of just working for me.

@Achno
Copy link
Owner

Achno commented Feb 25, 2025

@MillerApps

The artifacts seem to diminish when when i full-size my terminal. I also noticed you have a maximized terminal and trying this. try minimizing to a dimension like mine

Screenshot_20250226_005532

@MillerApps
Copy link
Contributor Author

MillerApps commented Feb 25, 2025

@Achno heres mine at a reduced size

CleanShot 2025-02-25 at 17 59 46@2x

Mine still seems to fine.

@Achno
Copy link
Owner

Achno commented Feb 25, 2025

@MillerApps

Yea i get it, i know its been frustrating, don't worry i won't bother you anymore. I will at least push the feature as experimental behind the flag.

I'm merging this in the feature branch, i will refactor some code and then i will merge it to main a bit later

@Achno Achno merged commit 58a3ef2 into Achno:img-preview Feb 25, 2025
@MillerApps
Copy link
Contributor Author

MillerApps commented Feb 25, 2025

@Achno, if I was of help on this, that's really all that matters. Eventually, it will all work as it seemingly does for me. If you don't mind tagging me when it's figured out, I wish it just worked or at least was consistent with the issues. But as it stands, the bug seems to be Linux-based, or at least that's what I presume. Best wishes, and I'm sure I'll open more PRs in the future if I feel I can be of help.

P.S. No bother at all, just ever frustrating that the hydra keeps fighting back lol.

@Achno
Copy link
Owner

Achno commented Feb 25, 2025

@MillerApps

the bug seems to be Linux-based

I actually have 0 idea what it is, because its image based, all of the images i have tried so far work fine except that one i shared, super weird.

P.S. No bother at all, just ever frustrating that the hydra keeps fighting back lol.

Yea no kidding, i don't think i ever had so much frustration in any other feature.

I will close your issue when i merge it on main, so you will be notified then, thanks for contributing your time and effort :)

@MillerApps
Copy link
Contributor Author

@Achno

At least it was a good learning experience for both of us.

image

Achno added a commit that referenced this pull request Feb 26, 2025
…at) (#41)

* added inline preview & refactored terminal utils

* feat: finish inline with reszing imgs

* feat:  inline Image preview with reszing  (#40)

* refactored terminal.go for better error handling and removing fprintf

---------

Co-authored-by: MillerApps <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants