This PR was tested on Ubuntu with:
```
EDIT_CFG_ICUUC_SONAME=libicuuc.so.74
EDIT_CFG_ICUI18N_SONAME=libicui18n.so.74
EDIT_CFG_ICU_RENAMING_VERSION=74
cargo build --config .cargo/release.toml --release
```
Search & Replace now works flawlessly. I hope that package maintainers
will be able to make use of this when ingesting future versions of Edit.
Closes#172
With the latest winget-create release, the preferred method for
providing the GitHub token in CI/CD environment is via the environment
variable `WINGET_CREATE_GITHUB_TOKEN`. Removed use of `--token` and
switched to environment variable. See https://aka.ms/winget-create-token
for details.
* Make each paste its own undo step.
* Add a `Paste` input type, allowing us to...
* Fill the internal clipboard with bracketed paste contents.
* Abstract away clipboard handling into its own struct, so we can move
the cut/copy/paste logic into `TextBuffer`, allowing us to...
* Implement smart line-wise copy/paste via Ctrl+C/Ctrl+V.
Closes#286Closes#305
As per James Holderness' suggestion, we actually don't
need ESC timeouts here. In this phase of the app, escape
chars are very unlikely to be from keyboard input.
The recommendation is based on the poll at:
https://github.com/microsoft/edit/discussions/341
This PR also includes a neat overview table for packages.
Co-Authored-By: Shun Sakai <sorairolake@protonmail.ch>
The previous `memchr` loop had the fatal flaw that it would break out
of the SIMD routines every time it hit a newline. This resulted in a
throughput drop down to ~250MB/s on my system in the worst case.
By writing SIMD routines specific to newline seeking, we can bump
that up by >500x. Navigating through a 1GB of text now takes ~16ms
independent of the contents.
`DisplayablePathBuf::from_string` allocates two heap memories for
`PathBuf` and `Cow::Owned`. However, it can be stored as `Cow::Borrowed`
because `String` guarantees UTF-8 sequence. This can remove one
redundant heap allocation.
This code was originally written for speeding up line searches but was disabled since we've since optimized line seeking with SIMD. We'll still have use for this code in the future, however, to cache syntax highlighter state every N lines.
Also includes:
* criterion update to v0.6
* Simplify range parameter for `GapBuffer::extract_raw`
* Allow deleting multiple units via `TextBuffer::delete`
* And some additional smaller improvements
I think this workflow needs to run on push to `main` _as well as_ pull
request to main so that it shows up as an available branch protection
status check.
Given that it's not just PRs any longer, I renamed it too.