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]Err Fprintln #94

Open
gczgcz2015 opened this issue Jul 6, 2021 · 10 comments
Open

[BUG]Err Fprintln #94

gczgcz2015 opened this issue Jul 6, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@gczgcz2015
Copy link

gczgcz2015 commented Jul 6, 2021

Describe the bug
when i run hello example somting wrong

To Reproduce
run hello example

Expected behavior
correct print

Screenshots
image

Environment (please complete the following information):
Linux version 5.10.7-3-MANJARO (builduser@LEGION) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Fri Jan 15 21:11:34 UTC 2021

@gczgcz2015 gczgcz2015 added the bug Something isn't working label Jul 6, 2021
@gczgcz2015 gczgcz2015 changed the title [BUG] [BUG]Err Fprintln Jul 6, 2021
@mjarkk
Copy link
Member

mjarkk commented Jul 6, 2021

From your screenshot it looks like you're using GoLand's integrated terminal and from prior experience they seem to have a bit of a buggy terminal.
Does this also happen in the dedicated terminal application?

@gczgcz2015
Copy link
Author

gczgcz2015 commented Jul 7, 2021

From your screenshot it looks like you're using GoLand's integrated terminal and from prior experience they seem to have a bit of a buggy terminal.
Does this also happen in the dedicated terminal application?

image
i tried 2 different terminal(konsole,alacritty), still has problem

@dankox
Copy link

dankox commented Jul 7, 2021

Hi, do you use monospace font on your terminals? The text seems to take less space than the frame characters.

Another question is, what version of gocui are you using. From the IDE screenshot, it seems like you have old version v0.4.0 or v0.3.1. Can you check if you build with the latest one?

@gczgcz2015
Copy link
Author

Hi, do you use monospace font on your terminals? The text seems to take less space than the frame characters.

Another question is, what version of gocui are you using. From the IDE screenshot, it seems like you have old version v0.4.0 or v0.3.1. Can you check if you build with the latest one?

version is 1.0.1

@mjarkk
Copy link
Member

mjarkk commented Dec 30, 2021

Which terminal font are you using?

@gczgcz2015
Copy link
Author

Which terminal font are you using?

font is Source Code Pro
when i use jroimartin/gocui, it's OK

@mjarkk
Copy link
Member

mjarkk commented Jan 9, 2022

Can you try to run the tcell demos and check if they work?

https://github.com/gdamore/tcell/tree/master/_demos

@dankox
Copy link

dankox commented Jan 10, 2022

Can you also try the hello.go example and set the frame to be ascii? You can do that by updating main() function like this:

func main() {
	g, err := gocui.NewGui(gocui.OutputNormal, true)
	if err != nil {
		log.Panicln(err)
	}
	defer g.Close()
	g.ASCII = true  // <- this line was added

	g.SetManagerFunc(layout)

Also I would like you to try this command in the terminal (alacritty or whatever you are using and seeing the problems):

printf "┌─────────────┐\n│Hello world! │\n└─────────────┘\n"

Let us know how the output looks like. This is the same as hello.go is producing, so we might be sure if the problem is in the underlying library, or in the terminal setup.

@gczgcz2015
Copy link
Author

Can you also try the hello.go example and set the frame to be ascii? You can do that by updating main() function like this:

func main() {
	g, err := gocui.NewGui(gocui.OutputNormal, true)
	if err != nil {
		log.Panicln(err)
	}
	defer g.Close()
	g.ASCII = true  // <- this line was added

	g.SetManagerFunc(layout)

Also I would like you to try this command in the terminal (alacritty or whatever you are using and seeing the problems):

printf "┌─────────────┐\n│Hello world! │\n└─────────────┘\n"

Let us know how the output looks like. This is the same as hello.go is producing, so we might be sure if the problem is in the underlying library, or in the terminal setup.

when add ascII = true it's OK

image

@dankox
Copy link

dankox commented Jan 21, 2022

Ok and what about the printf command? Did it work?
From the ASCII=true sample, it seems that the problem might be the monospace font which you are using. So to confirm this, if you could try that printf to see if it displays correctly or not. Thanks

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

No branches or pull requests

3 participants