feat(ime): minimal IME support for the text_box widget#539
Merged
jklgrasso merged 3 commits intopop-os:masterfrom Apr 27, 2026
Merged
feat(ime): minimal IME support for the text_box widget#539jklgrasso merged 3 commits intopop-os:masterfrom
jklgrasso merged 3 commits intopop-os:masterfrom
Conversation
5 tasks
af425d0 to
610337d
Compare
6d9c912 to
a3e184d
Compare
Contributor
Author
|
I have a trivial fix not pushed. |
a3e184d to
2dbc40b
Compare
e202001 to
2898691
Compare
f96bbed to
7546e73
Compare
Use the previous caret(text cursor) position to place the input method window when the position is not available
- iced UserInterface.update() starts with InputMethod::Disabled state, and merges any input_method_request() which is InputMethod::Enabled in widgets tree traversal. - We don't enable the input method feature if the widget doesn't have focus, we can safely omit request_input_method() call itself.
7546e73 to
0d532e6
Compare
wash2
approved these changes
Apr 14, 2026
Contributor
Author
|
Hi, is this waiting for QA? My understanding is your QA will ensure my change doesn't break existing use-cases (mainly System76 hardware customers' non-IME use-cases). Any input will help? |
jklgrasso
approved these changes
Apr 22, 2026
jklgrasso
left a comment
There was a problem hiding this comment.
Checklist:
Basic operations
- Type three lines of text (no trailing newline).
- Copy the last two lines.
- Paste at the end of the third line (file should now have four lines).
- Ctrl-Z to undo the paste.
- Selecting text without using 'ctrl' causes undo to remove more than expected. Not a regression. Issue #564 created to address
- Press Enter to add a trailing newline.
- Paste again (file should now have five lines).
- Ctrl-Z to undo the paste.
- Ctrl-Shift-Z to redo the paste.
- Save the file.
- Ctrl-F and search for something that has a match.
- Press Esc twice to exit the Find dialog.
- Press Ctrl-X to cut the selected search result.
- Paste the cut text on a new line (file should now have six lines).
- Re-save the file.
- Narrow the window until the lines start wrapping (make a line longer if necessary to observe line wrapping).
- Turn word wrapping off.
- Scroll right to the end of the document, then left to the beginning again.
- Click and drag to select some text past the horizontal edge of the window.
- Close the file, open COSMIC Edit again, and open the file via the recents list.
- Does not work. Not a regression
- Close the file again, open COSMIC Edit again, and open the file via the Open dialog.
- Turn word wrapping back on.
Settings
- Open View -> Settings.
- All Appearance settings work.
- Vim bindings work.
Projects & Git Management
- Clone the cosmic-edit Git repo and open its directory as a project.
- Edit -> Find in project... works.
- Make a change in a file.
- File -> Git management shows the change and staging it works.
- Make another change while Git management's open; it updates to show the new change.
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.
Fix the
cosmic-editspecific part of pop-os/cosmic-epoch#2174.The input method support in iced 14.0 requires text widgets to implement some logic to support input method input.
This PR includes this for the
cosmic-editspecific text widgets intext_box.rs.2026-03-24.23-54-27.mp4
FYI, my old PR of backporting the IME feature may be a good reference to add IME support for an existing custom text widget. See
text_editor.rs:For text components other than
text_box, the following PRs will add IME support:(I will force-push this branch to update my fork to rebase to newer upstream rev)