Replace tui-textarea by own implementation#2851
Open
cruessler wants to merge 22 commits intogitui-org:masterfrom
Open
Replace tui-textarea by own implementation#2851cruessler wants to merge 22 commits intogitui-org:masterfrom
tui-textarea by own implementation#2851cruessler wants to merge 22 commits intogitui-org:masterfrom
Conversation
This commit removes methods related to selection from the API.
extrawurst
reviewed
Jan 24, 2026
Collaborator
extrawurst
left a comment
There was a problem hiding this comment.
Awesome work! I think for an MVP we can leave out all todos besides the one for the mask input (needed for password inputs)
src/components/textinput.rs
Outdated
| } | ||
|
|
||
| fn set_mask_char(&mut self, _char: char) { | ||
| todo!(); |
Collaborator
There was a problem hiding this comment.
we will likely need that to support password inputs
This is to have a single source of truth for `self.scroll.top`. Currently, it depends entirely on `self.cursor.0` and keeping it that way obviates the need to change `self.cursor.0` after calling `self.scroll.move_top`. Instead, we don't call `self.scroll.move_top`, but simply change `self.cursor.0`. This change then propagates to `self.scroll.top` through `self.scroll.update` in `draw`.
Collaborator
Author
|
Perfect! I’ve now addressed all the remaining TODO items. I’ve tested the component as it is used inside the commit message popup. Apart from that, I relied on the tests that I added. I’m reasonably sure that things are working as expected, but it certainly wouldn’t hurt if someone else also tested the changes. :-) |
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.
This PR is an attempt at unblocking #2827. It removes the dependency on
tui-textareaand implements a component that is mostly API-compatible withTextArea. The new component currently has a reduced API surface, in order to make this initial PR smaller. I hope that I’ve already implemented most of the methods we want to keep using.@extrawurst Some of the methods are still marked as
todo!(). Would you mind having a quick look to let me know which ones we want to have implemented before this can be merged?TODO
set_mask_char