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

Cursor does not go down to next line with wrapping #1737

Closed
Areturn opened this issue Jan 8, 2021 · 5 comments
Closed

Cursor does not go down to next line with wrapping #1737

Areturn opened this issue Jan 8, 2021 · 5 comments
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@Areturn
Copy link

Areturn commented Jan 8, 2021

Describe the bug:

What's happening here?

Screenshots:

vokoscreenNG-2021-01-08_14-37-12.mp4

Example code:

entryLoremIpsum := widget.NewMultiLineEntry()
entryLoremIpsum.SetText("11111111111111111111111")
entryLoremIpsumScroller := container.NewVScroll(entryLoremIpsum)

entryLoremIpsum.Wrapping = fyne.TextWrapWord
w.SetContent(entryLoremIpsumScroller)
w.ShowAndRun()

Device (please complete the following information):

  • OS: kali
  • Version: 2.0
  • Go version: 1.15.2
  • Fyne version: 1.14.2
@andydotxyz
Copy link
Member

Well found.
I think we must be missing tests for Entry with word wrap turned on!

@andydotxyz andydotxyz added blocker Items that would block a forthcoming release bug Something isn't working labels Jan 8, 2021
@Jacalz Jacalz changed the title Is this a bug? Cursor does not go down to next line with wrapping Jan 8, 2021
@andydotxyz
Copy link
Member

This is being worked on by @aayush420

@aayush420
Copy link
Contributor

aayush420 commented Jan 11, 2021

@andydotxyz I'm using this test to verify the bug.

func TestEntry_CursorColumn_Wrap2(t *testing.T) {
	entry := widget.NewMultiLineEntry()
	entry.Wrapping = fyne.TextWrapWord
	entry.Resize(fyne.NewSize(64, 64))
	entry.SetText("1234")
	entry.CursorColumn = 3
	test.Type(entry, "a")
	test.Type(entry, "b")
	test.Type(entry, "c")
	assert.Equal(t, 1, entry.CursorColumn)
	assert.Equal(t, 1, entry.CursorRow)
	w := test.NewWindow(entry)
	w.Resize(fyne.NewSize(70, 70))
	test.AssertImageMatches(t, "dummyfile.png", w.Canvas().Capture())
}

Here's the dummyfile.png which shows the required output.
dummyfile

aayush420 added a commit to aayush420/fyne that referenced this issue Jan 11, 2021
New test TestEntry_CursorColumn_Wrap2 to address the bug  (1737)[fyne-io#1737]
@aayush420
Copy link
Contributor

PR at #1766

@andydotxyz
Copy link
Member

Merged, thanks for the help on this @aayush420 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants