[PR #1884] [MERGED] Creative: Ctrl+Backspace deletes a word in the search #3838

Closed
opened 2026-11-03 04:12:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1884
Author: @cryingtoilet
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: fix/1764-creative-search-word-delete


📝 Commits (1)

  • 13508cb Creative: Ctrl+Backspace deletes a word in the search

📊 Changes

6 files changed (+92 additions, -50 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -2)
📝 crates/horizon-client/src/game/clipboard.rs (+16 -6)
📝 crates/horizon-client/src/game/control.rs (+1 -1)
📝 crates/horizon-client/src/game/pad_menu.rs (+4 -2)
📝 crates/horizon-client/src/screen_draw.rs (+1 -20)
📝 crates/horizon-client/src/ui.rs (+67 -19)

📄 Description

🤖 Opened by @cryingtoilet's AI agent (DeepSeek V4.1 Flash Free), not by @cryingtoilet himself.

What

Ctrl+Backspace in the creative search deleted one character. The box is an append-only EditBox of 50 characters, while every other field follows EditBox.keyPressed: clear a Select All selection first, otherwise delete to getWordPosition(-1, end).

  • ui::word_position and ui::delete_words hold that logic. ui::EditBox and the chat TextField each kept a copy before; both call the shared version now.
  • OSK backspace and horizon-ctl type still delete one character, since no Ctrl is held.

Fixes #1764.

Vanilla

net.minecraft.client.gui.components.EditBox.keyPressed, deleteWords, getWordPosition, deleteChars.

How tested

ui::tests::word_position_steps_over_a_word_and_its_spaces and ui::tests::delete_words_removes_the_word_before_the_end cover spaces, a position inside a word, both ends and non-ASCII text. No harness reaches this input path.

pr_ready (tools/pr_ready.py on jan-h510mh, against origin/main at 108773907, 2 min 0 s)

Check Result
Scope ✅ 6 files, +92 −50
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (6 s)
clippy ✅ (41 s)
tests: horizon-client ✅ 1240 passed (1 min 11 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1884 **Author:** [@cryingtoilet](https://github.com/cryingtoilet) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/1764-creative-search-word-delete` --- ### 📝 Commits (1) - [`13508cb`](https://github.com/horizon-rust/horizon/commit/13508cbd9c6ee7122694dc3f1482a10683f408ca) Creative: Ctrl+Backspace deletes a word in the search ### 📊 Changes **6 files changed** (+92 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -2) 📝 `crates/horizon-client/src/game/clipboard.rs` (+16 -6) 📝 `crates/horizon-client/src/game/control.rs` (+1 -1) 📝 `crates/horizon-client/src/game/pad_menu.rs` (+4 -2) 📝 `crates/horizon-client/src/screen_draw.rs` (+1 -20) 📝 `crates/horizon-client/src/ui.rs` (+67 -19) </details> ### 📄 Description > 🤖 Opened by @cryingtoilet's AI agent (DeepSeek V4.1 Flash Free), not by @cryingtoilet himself. ## What Ctrl+Backspace in the creative search deleted one character. The box is an append-only `EditBox` of 50 characters, while every other field follows `EditBox.keyPressed`: clear a Select All selection first, otherwise delete to `getWordPosition(-1, end)`. - `ui::word_position` and `ui::delete_words` hold that logic. `ui::EditBox` and the chat `TextField` each kept a copy before; both call the shared version now. - OSK backspace and `horizon-ctl type` still delete one character, since no Ctrl is held. Fixes #1764. ## Vanilla `net.minecraft.client.gui.components.EditBox.keyPressed`, `deleteWords`, `getWordPosition`, `deleteChars`. ## How tested `ui::tests::word_position_steps_over_a_word_and_its_spaces` and `ui::tests::delete_words_removes_the_word_before_the_end` cover spaces, a position inside a word, both ends and non-ASCII text. No harness reaches this input path. **pr_ready** (`tools/pr_ready.py` on jan-h510mh, against origin/main at 108773907, 2 min 0 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +92 −50 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (6 s) | | clippy | ✅ (41 s) | | tests: horizon-client | ✅ 1240 passed (1 min 11 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:40 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3838
No description provided.