You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prompt: reduce memory allocations¹ to zero²!
1. Explicit memory allocations in the writeChanges function
2. When looked at mathematically, the ratio of allocations per call to
writeChanges approaches zero as number of calls approaches infinity
Git commits can have fine print, too!
...
This commit removes the system which previously would always allocate a
slice of runes every time a keystroke would modify the output buffer,
thus resulting in far fewer total memory allocations. There are
probably a million other places that could be improved, but this one was
an easy fix.
Prompt: don't erase line on enter
Fixes bug where prompt would draw the changes immediately after the
ENTER key was hit, causing the line to be lost since Reader's processing
of the ENTER key was to clear the input and return the line