Conversation
Pure-shell perf work focused on the keystroke→event→redraw path, validated across bash/zsh/ksh93/mksh/busybox with byte-identical behavior. - ord.sh: make _tuish_ord fork-free for bytes >=128. The old non-ASCII fallback forked $(printf '%d' ...) once per UTF-8 byte. Now bash/zsh use a fork-free `printf -v` path and other shells a generated case keyed on the chr table (extended to 255). Returns unsigned 1-255, which also makes event.sh's UTF-8 lead-byte checks reliable on signed-char platforms. - hid.sh: collapse up to 24 sequential modifier-helper calls per modified key into one head-case + one modifier-case (modifier slot anchored as exactly two digits, rejecting extra-parameter sequences). Resolve the most frequent class C (typing) first via early return. Remove the now unused _tuish_5code/6code_modifiers helpers. - str.sh: inline the UTF-8 decode in tuish_str_width over the local value, dropping the per-byte eval indirection; codepoint arithmetic unchanged. Adds a headless cross-shell benchmark harness under tests/bench/ and a resolver-level golden test (tests/unit/test_event_modifiers.sh) covering the full key x modifier cross product; folds the direct-helper tests into it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pure-shell perf work focused on the keystroke→event→redraw path, validated across bash/zsh/ksh93/mksh/busybox with byte-identical behavior.
printf -vpath and other shells a generated case keyed on the chr table (extended to 255). Returns unsigned 1-255, which also makes event.sh's UTF-8 lead-byte checks reliable on signed-char platforms.Adds a headless cross-shell benchmark harness under tests/bench/ and a resolver-level golden test (tests/unit/test_event_modifiers.sh) covering the full key x modifier cross product; folds the direct-helper tests into it.