[PR #7082] [MERGED] Port ledger: MultiLineEditBox.setValue is ported #7321

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7082
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/ledger-final-001-x


📝 Commits (1)

  • 44ace2d Port ledger: MultiLineEditBox.setValue is ported

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/port_map/final-001.tsv (+1 -1)

📄 Description

Corrects one stale row in tools/port_map/final-001.tsv, checked against upstream/main (26.3).

row was now
MultiLineEditBox.setValue missing — "no multi-line box setter found" port crates/horizon-client-render/src/multiline_edit.rs::MultiLineEdit::set_value

Citations:

  • multiline_edit.rs:146-157 MultiLineEdit::set_value: takes the new text, truncates it at the box's character limit, and — unless overflows_line_limit says the value has more lines than the limit allows — stores it, puts the cursor and the selection end after it, and calls on_value_change (the reflow). Its doc names setValue(value, false): the text stays as it was when the value would overflow.
  • It is the setter the multiline text input uses: game/dialogs.rs:196 calls edit.set_value(font, initial) for a MultiLineEditBox control, the same place vanilla's InputControlHandlers.TextInputHandler.addControl (the listed caller of MultiLineEditBox.setValue) sets the box's value. MultiLineEdit is the class home the ledger gives MultiLineEditBox (multiline_edit.rs), and the box's own value/cursor/selection/reflow all live there.

map-check (build of upstream/main with the 26.3 client and server jars, 76807 methods):

$ PORT_LEDGER_OUT=/tmp/pledger-a1x python3 tools/port_ledger.py map-check tools/port_map/final-001.tsv
11 rows, no problems.

Proven: MultiLineEdit::set_value exists in this tree, takes the box as &mut self, and does what MultiLineEditBox.setValue does — replace the text, clamp it to the character limit, refuse a value over the line limit, then reflow and put the cursor at the end. The ledger's reverse lookup for that fn names MultiLineEditBox.setValue and nothing else, and its forward lookup names the same fn as the method's same-name port. The other ten rows in the file were left alone: none of them claims a gap this tree has since closed (map-check is clean before and after the edit).

Not proven: vanilla's setValue goes through MultilineTextField.setValue (the ledger lists it as a callee, mapped); Horizon has no separate text field, the box holds its characters itself, so the two steps are this one fn — a call-graph-for-call-graph match, not a line-by-line one. BookEditScreen.updatePageContent is the other caller in vanilla; Horizon's book screen keeps its page text in game/books.rs and sets it through that screen's own page box, so nothing here exercises a book page. No test covers the setter: neither the character-limit truncation nor the line-limit refusal was driven beyond reading the code.


🔄 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/7082 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/ledger-final-001-x` --- ### 📝 Commits (1) - [`44ace2d`](https://github.com/horizon-rust/horizon/commit/44ace2db1cbd9e92371a32bbbaa94438bd3edcd0) Port ledger: MultiLineEditBox.setValue is ported ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/final-001.tsv` (+1 -1) </details> ### 📄 Description Corrects one stale row in `tools/port_map/final-001.tsv`, checked against `upstream/main` (26.3). | row | was | now | | --- | --- | --- | | `MultiLineEditBox.setValue` | `missing` — "no multi-line box setter found" | `port` `crates/horizon-client-render/src/multiline_edit.rs::MultiLineEdit::set_value` | Citations: - `multiline_edit.rs:146-157` `MultiLineEdit::set_value`: takes the new text, truncates it at the box's character limit, and — unless `overflows_line_limit` says the value has more lines than the limit allows — stores it, puts the cursor and the selection end after it, and calls `on_value_change` (the reflow). Its doc names `setValue(value, false)`: the text stays as it was when the value would overflow. - It is the setter the multiline text input uses: `game/dialogs.rs:196` calls `edit.set_value(font, initial)` for a `MultiLineEditBox` control, the same place vanilla's `InputControlHandlers.TextInputHandler.addControl` (the listed caller of `MultiLineEditBox.setValue`) sets the box's value. `MultiLineEdit` is the class home the ledger gives `MultiLineEditBox` (`multiline_edit.rs`), and the box's own value/cursor/selection/reflow all live there. map-check (build of `upstream/main` with the 26.3 client and server jars, 76807 methods): ``` $ PORT_LEDGER_OUT=/tmp/pledger-a1x python3 tools/port_ledger.py map-check tools/port_map/final-001.tsv 11 rows, no problems. ``` **Proven:** `MultiLineEdit::set_value` exists in this tree, takes the box as `&mut self`, and does what `MultiLineEditBox.setValue` does — replace the text, clamp it to the character limit, refuse a value over the line limit, then reflow and put the cursor at the end. The ledger's reverse lookup for that fn names `MultiLineEditBox.setValue` and nothing else, and its forward lookup names the same fn as the method's same-name port. The other ten rows in the file were left alone: none of them claims a gap this tree has since closed (`map-check` is clean before and after the edit). **Not proven:** vanilla's `setValue` goes through `MultilineTextField.setValue` (the ledger lists it as a callee, mapped); Horizon has no separate text field, the box holds its characters itself, so the two steps are this one fn — a call-graph-for-call-graph match, not a line-by-line one. `BookEditScreen.updatePageContent` is the other caller in vanilla; Horizon's book screen keeps its page text in `game/books.rs` and sets it through that screen's own page box, so nothing here exercises a book page. No test covers the setter: neither the character-limit truncation nor the line-limit refusal was driven beyond reading the code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37: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#7321
No description provided.