* Autocomplete Overlay supports TextEditor
* Add Overlay to CodyBody's ControlTemplate
* Don't show help tip when autocomplete is showing
* 3 categories of autocomplete:
-> streams
-> arguments
-> commands
pull examples from actual code, semi-randomly. This takes a lot longer, but produces much better documentation, including realistic values and streams.
`IndexOfPartial` now uses improved sort order.
Improved sort order now prefers shorter tokens over longer tokens (PIDGEOT before PIDGEOTTO)
GetBestOptions now uses SortOptions
TrainerPokemonTeamRun now uses SortOptions for autocomplete
Update tests based on new expected sort orders
when typing a script command, when you press space, it'll autocomplete to the 'best' match. So if you forget a period or capital letter, it'll still work the way you expect.
instead of just preferring to match the lowest possible ID that counts as a partial match, add some extra criteria to make it act closer to how people expect.
* prefer entries where no letters are skipped
* prefer entries where the start of the partial matches the start of the full
* pressing escape should close the script tip
* fix automatic inclusion of <auto> behavior
* Fix possible crash when looking for closing } when there isn't one
* Only update TextEditor layers if they've changed (performance)
* creating a new event script should include lock/faceplayer/release
* adjust focus when switching tabs (close open tips)
* only try to access list coments if the list isn't null
* Avoid using foreach/enumorables in `MacroScriptLine.Matches` since it's called so often.
* Use Span<char> to reduce string allocations in `ArrayRun.ctor` and `ArrayRunEnumSegment.GetOptions`
* don't store the delta object used for initial setup
* avoid making lambdas in `ScriptLine.Matches`, which is called very often.
* use use List<int> instead of SortedSpan<int> for building the initial DestinationToSource cache, since we're already guaranteed that they'll be added in order and without duplicates. This greatly reduces the number of int[] arrays created during startup.
* allow `ArrayRunPointerSegment` to cache the table content results from parsing its InnerFormat, so it doesn't have to re-parse each time. This greatly reduces the number of string allocations.
* Use `ThreadSafeDictionary` for `TryGetValueCaseInsensitive` so we don't need to create a new collection of keys each time we call the method. Also add key caching to `ThreadSafeDictionary` so we don't need to make a new collection each time it's requested.
* Make `GetOptions` return a readonly list. We already know it's unique, this means we don't have to make a new collection every time we parse segments.
* limit the number of undo tokens we store (default 100) to save memory
* Use `byte[]` and `Array.Copy` instead of `List<byte>` and `AddRange` to reduce byte array allocations when loading a file.
* Freeze geometries in the `Icons` collection.
* add option for running garbage collection from the developer menu
* use a custom `AutomationPeer` to prevent WPF from holding memory after controls have been closed.