Closed rcoreilly closed 1 month ago
this is regression from latest update to texteditor layout update.
also not scrolling at the end either.
the final update call is happening in:
texteditor/buf.go: func (tb *Buf) AutoScrollViews() {
I added an ed.SetNeedsLayout there, but it is getting swallowed somehow (and for ed.Layout.SetNeedLayout too)
Also getting the situation where initial click on link (e.g., in find, err) does not jump to the correct position until a key event triggers a render update.
also jump to line doesn't work the first time.
This appears to be specific to Code -- not replicable in any of the cases in plain texteditor example.
Jump to line had a bizarre ge.Indent call stuck in it -- removing that seems to fix that issue.
the find link clicks seem to be due to LongPress intruding -- increasing this to 1s fixes this issue.
the original issue here is still present but fixes itself immediately after any render update is triggered, so it is lower pri.
So will you close the issue?
Jump is still not working again actually -- on first time in a new file.
and link click is still pulling up a context menu!
recent fixes have resolved the important aspects of this. will file more specific issues if anything else comes up.
All text editors no longer have scrollbars on initial render, and they also do not get allocated enough space. This regression happened sometime during the big renaming PR.
This is not a regression: the separate texteditor demo still works (and code still works for main editors) with latest. It is something to do with having the editors within the demo tabs structure. this is consistent with the fact that the scrollbar issue only happens in code for tabs. will investigate.
Again, this issue also happens in the documentation and unit tests, and it is not limited to tabs.
I am seeing scrollbars in docs.
re the sizing: I don't think there is really a sensible universal default size for a texteditor -- would it make more sense to just specify that as needed, in the docs?
This is now fully fixed I hope! initial layout was being done before enough size info was avail -- now doing in SizeDown and seems to be working reliably. also fixed the issues with autoscroll in code.
Describe the bug
see title
How to reproduce
diff in cogent code with lots of diffs
Example code
No response
Relevant output
No response
Platform
macOS