As a drive-by this also puts all replace-all
changes into a single undo group.
Tested by:
* Running Replace-All with `$` and "x": Every line gets a trailing "x",
the final line gets a lone "x" and a new trailing newline is added.
* Running Replace with `$` and "x" repeatedly: New "x"s are added to
each line incrementally, and it wraps around the buffer.
Closes#775
Co-authored-by: Leonard Hecker <leonard@hecker.io>
Without a node-path check, the order of UI element creation
mattered. Since models are created after the text area this
meant that the text area would steal all scroll input.
This regressed in #603
This broke in #556, which moved the stdin reopen from `init()` into
`switch_modes()`. But `open_stdin_if_redirected()` was called inside
`handle_args()`, which runs before `switch_modes()`.
So, after #556, it would never see the reopened `stdin`.
This PR adds tools/install.sh and a small README section to provide a
single-line Linux install (curl | bash) that builds Edit from source
across popular distros. It does not modify Edit’s code. Instead, it
prepares the system so Edit’s existing ICU-based search works reliably
by ensuring unversioned ICU SONAMEs are discoverable at runtime. This
resolves issue #616.
---------
Co-authored-by: Leonard Hecker <leonard@hecker.io>
- herestring terminators must be at start of line
- ` is the escape character for strings in this language
- single quoted strings do not get escapes at all
* Use `io::Error` for OS error handling
(This results in some added bloat, but is more convenient for now.)
* Add an `icu` error type
* Move `apperr` from the library into the binary
This also sneaks in a minor improvement to sorting.
The only two places we need to sort, don't need stable sorting.
(Unstable sorting is a lot faster and simpler.)
The main change is adding multithreading support in order to make JSON
unit tests work properly. The TLS overhead is not _that bad.
Other changes:
* Switch to `io::Result`, because `AllocError` doesn't
transmit error codes (meh!)
* Reduce x86 commit chunk size to 32KiB
* Improved performance slightly by inlining harder (`alloc_uninit`)
and outlining the result unwrap (`alloc_raw_bump`)