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

output.go return new buf and simplify term.go #70

Closed
wants to merge 1 commit into from

Conversation

figuerom16
Copy link
Contributor

In reference to #69

The whole issue was that we were modifying the original buffer then returning it. Simply copying the buffer before returning it allows us to use an if statement safely without having to copy(append) every time. Sorry I should have realized that sooner.

@andydotxyz
Copy link
Member

andydotxyz commented Feb 22, 2024

Sadly that also triggers vim here:

same

I think it relates to the num index but not sure...

@figuerom16
Copy link
Contributor Author

I'm still suspicious if it's some vim special ANSI escape code or maybe it is weird with byte indexing like you said. What Linux Distros does this happen to you on? I can virtualize them to see if I can replicate the issue and track it down.

@andydotxyz
Copy link
Member

andydotxyz commented Feb 25, 2024

That test was on Debian stable

Just to check, Darwin did not have this but did output the same colour code errors so it's not related to that ;)

@figuerom16
Copy link
Contributor Author

figuerom16 commented Feb 25, 2024

I tested with Debian 12 stable. Tried it with Gnome, KDE, and XFCE Desktop Environments using this PR. vim test.txt worked for me every time. I didn't install golang through sudo apt install golang so I am using version 1.22.0, but otherwise I followed the fyne docs.

Are you using i3 or different DE that I should test?
Should I test the Debian version of golang?

vim

@andydotxyz
Copy link
Member

I wondered if it was the Go version, but 1.19.8 on Debian has this issue and 1.19.8 on Darwin does not.
Perhaps you are able to install 1.19 on the Debian VM from apt and see if it is that specific?

@andydotxyz
Copy link
Member

One other thing I just noticed, and maybe forgot before...
It seems to break more than just vim - but the terminal state internally somehow.
Typing ":q!" won't change what is displayed. Though tapping ctrl-D afterwards does exit, so the software is running but the terminal has stopped updating!

@figuerom16
Copy link
Contributor Author

figuerom16 commented Feb 26, 2024

I rm -rf /usr/local/go then installed Go 1.19.8 from apt and cleared ~/go. vim worked fine without issue. The only other thing I do is clear bash history since I occasionally get a random C malloc error from it. > .bash_history

Sorry, I'm stumped on why terminal is behaving so strangely for you on Debian.

@figuerom16
Copy link
Contributor Author

I've been racking my brain on why this is happening. As silly as this sounds may I ask how you got your terminal to display the reverse title controls with left window controls vs right? If it's not a DE then maybe it's a theme with a bad plugin? I've seen stranger things happen and I'd like to replicate it.

Distribution: Debian 12
Desktop Environment: ?
Tweaks to DE: ?
Processor: ? (Here I can remove Host ISA through virtualization.)

@andydotxyz
Copy link
Member

The PR that this is replacing may not have been the original cause of the problem at this end.
I have seen it occur in a different situation now as well.
My apologies for the confusion, I have un-reverted the original fix so this change is no longer required I think.

Please re-open if you think that's not the case from current master branch.

@andydotxyz andydotxyz closed this Mar 22, 2024
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