Replies: 1 comment
-
After some more investigation, I've noticed that A quick fix to this problem for me was to do the following change in the if len(builder.buf) == cap(builder.buf) && builder.buf[0] == 0 {
s.selection = {len(builder.buf), 0}
} This may not be the best solution, and probably only works when using |
Beta Was this translation helpful? Give feedback.
-
Hi all. I have been scratching my head over the
text/edit
package for some time in an attempt to implement a simple text field. I have it working, but I seem to have stumbled across an issue in which every key I press seems to refresh the string builder data buffer. I cannot see where this may be happening with looking at the source code, both in my own code and in the text edit package. I have stepped through my code and it is clear that new data does not get appended, but rather replaced.Before Change:
After Change:
Here is the code I am testing with:
Anyone have any idea what is happening?
Beta Was this translation helpful? Give feedback.
All reactions