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

[BUG] [REGRESSION] First line not rendered on MinGW #105

Closed
coloursofnoise opened this issue Nov 14, 2021 · 3 comments · Fixed by #106
Closed

[BUG] [REGRESSION] First line not rendered on MinGW #105

coloursofnoise opened this issue Nov 14, 2021 · 3 comments · Fixed by #106
Labels
bug Something isn't working

Comments

@coloursofnoise
Copy link

coloursofnoise commented Nov 14, 2021

Describe the bug
The first line of the UI is cut off, and an extra empty line is added to the end when running on MinGW.

To Reproduce
Steps to reproduce the behavior:

  1. Use the latest version of awesome-gocui/gocui (v1.0.1)
  2. Use g.SetView("test", 0, 0, maxX-1, maxY-1, 0) to create a view that should surround the terminal
  3. Run the program (using winpty, see [BUG] MinGW compatibility #43)

Expected behavior
A border lining the terminal

Screenshots
image
scrolling up shows that the first line is indeed cut off
image

Environment (please complete the following information):

  • OS: Windows
  • Version 7

Additional context
Could not reproduce issue on native linux
Issue is not present when version v0.6.1-0.20191115151952-a34ffb055986 is pinned (version used by git bug) (a34ffb0)

@coloursofnoise coloursofnoise added the bug Something isn't working label Nov 14, 2021
@dankox
Copy link

dankox commented Nov 15, 2021

I do not have Windows 7 by my side to test it, but I remember this problem when I was trying new tcell implementation and was bugging me quite a bit. It is described in the PR and also a little bit in the documentation:
https://github.com/awesome-gocui/gocui/blob/master/migrate-to-v1.md#outputmode

also this comment in the original PR is about this problem:
#73 (comment)

The idea is that you setup TCELL_TRUECOLOR variable to disable.

However, reading thru the PR comments, I found out that this was later fixed in tcell and we didn't include it because it wasn't tagged.
Right now, it is in tagged version so we could probably update the tcell package.

Can you test it if it works for you? Just update the go.mod file like this:

module github.com/awesome-gocui/gocui

go 1.13

require (
	github.com/gdamore/tcell/v2 v2.4.0
	github.com/mattn/go-runewidth v0.0.9
	golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f // indirect
	golang.org/x/text v0.3.3 // indirect
)

Updating to 2.4 version should be good enough. If it doesn't work for whatever reason, then maybe just v2.1.0

If it would work, I would create PR to get it in.

@coloursofnoise
Copy link
Author

It seems to be fixed on both v2.1.0 and v2.4.0 of tcell.
If there's nothing else that would need to be changed with updating it, I can submit a PR to update to v2.4.0.

@dankox
Copy link

dankox commented Nov 23, 2021

Go for it. Also sorry for late answer :)

If you wouldn't mind and you would do the fix, can you also run thru the _examples directory and check if any of those programs are affected or not? I don't think it would happen (I checked what was added/fixed in tcell and all looks ok), but just to be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants