diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-31 17:10:34 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-31 17:12:41 +0800 |
| commit | eb54c560b5832ea4ca5129e13805be3c338ad2c9 (patch) | |
| tree | 63fa230167064ef5dca19b9a08579c4e5e4033c4 /CHANGELOG.md | |
| parent | 2e0ed19550f76b1df0658c5b745f85f36f238d37 (diff) | |
Fix trailing space and partial match bugs in default completion
Diffstat (limited to 'CHANGELOG.md')
| -rw-r--r-- | CHANGELOG.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec5cce..17e356c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,9 @@ #### Fixes: -None +1. **\[core:comp\]** Fixed `default_completion` incorrectly handling multi-level subcommand suggestions when the cursor is after a trailing space. `all_words.get(1..word_index)` could go out of bounds because Zsh's `$CURRENT` (`word_index`) may exceed `all_words.len()` when trailing whitespace is present. The range end is now capped with `.min(all_words.len())`. + +2. **\[core:comp\]** Fixed `default_completion` jumping to the next subcommand level on partial input (e.g. typing `b` for `bind` would skip `bind` and directly suggest third-level commands `add`/`ls`/`rm`). Now if the last input word is only a partial match (`starts_with` but not equal), the current-level word is suggested instead of skipping ahead. #### Optimizations: |
