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

Opening vim shows an empty screen (with the file name at the bottom) #69

Closed
andydotxyz opened this issue Feb 19, 2024 · 5 comments
Closed

Comments

@andydotxyz
Copy link
Member

A regression in the last month has somehow stopped vim from working on my Linux computer.

Cause was PR #64

@andydotxyz
Copy link
Member Author

The commit causing this appears to be a205930

@andydotxyz
Copy link
Member Author

I pushed a fix directly to master - it reverted always creating a new buffer.
It seems that on some Go or some platforms, the append on 0 length was not working as expected.

The current status is now part way between the original and the new - it only makes a new buffer when required, but also avoids corrupting buf by not writing into the same space...

Please let me know what you think @figuerom16

@figuerom16
Copy link
Contributor

That's really strange. I'm trying to replicate the problem in PopOS opening vim, but I can't seem to recreate the issue.
Unfortunately the change does recreate the old issue where leftOver can suddenly fill up on resize.

fmt.Println("lenLeftOver", lenLeftOver)
Then doing something like systemctl status
Then rapidly resizing the terminal will show sizes greater than 3 and garble the screen.

The only other error I'm getting is
2024/02/19 23:11:53 Fyne error: Failed to parse color mode: >4
2024/02/19 23:11:53 Cause: strconv.Atoi: parsing ">4": invalid syntax
2024/02/19 23:11:53 At: /home/matt/Documents/go/terminal/color.go:76
I doubt that would cause an issue though, but it might be worth tracking it down.

Is there a way I can recreate the vim issue easily?

@figuerom16
Copy link
Contributor

figuerom16 commented Feb 20, 2024

Found a way to disable the previous error. It's a special escape sequence that vim uses. >4;2m
metwork-framework/mfextaddon_vim#63
adding this setting to vimrc quiets it since the terminal isn't handling this special sequence.

let &t_TI = ""
let &t_TE = ""

I don't know if this was causing any issues with your vim though.

EDIT: thinking about this more if >4 is throwing an error then 2m gets processed. Wouldn't that mean that vims color mode gets set to Dim/Faint mode? Nevermind color mode 2 isn't being handled so it shouldn't cause an issue.

@andydotxyz
Copy link
Member Author

let &t_TI = ""
let &t_TE = ""

I don't know if this was causing any issues with your vim though.

Just to confirm I tested this and the warnings did go away but the error with not loading content in vim remains.

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

2 participants