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

Fix issue when a key name could be unknown #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

andydotxyz
Copy link
Member

Fixes #89

@xaionaro
Copy link

xaionaro commented Jul 20, 2024

Before

xaionaro@void:~$ fyneterm

Switch the layout to Russian and press CTRL + '=':

panic: runtime error: index out of range [0] with length 0

goroutine 12 [running]:
github.com/fyne-io/terminal.(*Terminal).TypedShortcut(0xc00027e400, {0xd98a60?, 0xc0066d0eb8?})
	/home/xaionaro/.gvm/pkgsets/go1.22.1/global/pkg/mod/github.com/fyne-io/[email protected]/input.go:170 +0x23b
fyne.io/fyne/v2/internal/driver/glfw.(*window).triggersShortcut.func1()
	/home/xaionaro/.gvm/pkgsets/go1.22.1/global/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:912 +0x24
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(...)
	/home/xaionaro/.gvm/pkgsets/go1.22.1/global/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/common/window.go:35
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/home/xaionaro/.gvm/pkgsets/go1.22.1/global/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:997 +0x136

After

xaionaro@void:~$ go install github.com/fyne-io/terminal/cmd/fyneterm@6d9024789cffec0be7ca224cfaab4f6a773f3388
go: downloading github.com/fyne-io/terminal v0.0.0-20240711112249-6d9024789cff
xaionaro@void:~$ fyneterm

Switch the layout to Russian and press CTRL + '=': nothing happens.

@andydotxyz
Copy link
Member Author

Switch the layout to Russian and press CTRL + '=': nothing happens.

What should Ctrl+= perform?

@xaionaro
Copy link

Switch the layout to Russian and press CTRL + '=': nothing happens.

What should Ctrl+= perform?

Well, I hoped to increase font size. But here I'm just saying that the bugfix helped and now it no longer panics (thus "nothing happens") :)

@andydotxyz
Copy link
Member Author

Increasing font size is Ctrl+"+" (ctrl + shift + "=" on my keyboard)

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.

CTRL + "=": panic: runtime error: index out of range [0] with length 0
2 participants