Auto focus should only trigger if the current tab is selected or else
closing an unfocused tab would move the focused tab.
See: pop-os/cosmic-files#1949
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
chore: update libcosmic
fix: redraw when deleting text where cursor doesn't move
editor only redraws if the action causes the cursor to move.
ctrl+a+backspace or presseing delete doesn't move the cursor.
Auto focus should only trigger if the current tab is selected or else
closing an unfocused tab would move the focused tab.
See: pop-os/cosmic-files#1949
* Support CJK input method
* Fix the input method window occasionally jumps around
Use the previous caret(text cursor) position to place the input method
window when the position is not available
* refactor: Omit calling request_input_method() if doesn't focus
- 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.
- Add unicode-segmentation dependency for proper grapheme cluster support
- Replace chars() iteration with graphemes(true) for accurate character counting
- Fix counting of complex Unicode characters like emojis, combining characters, and multi-byte sequences
- Resolves TODO: 'do graphemes?' in document_statistics function
This change provides more accurate character counts for international text,
emojis with skin tones, combined characters, and other multi-codepoint graphemes.
Examples of improved accuracy:
- 👍🏾 now counts as 1 character instead of 2
- é (e + combining acute) counts as 1 character instead of 2
- 🧑💻 (person technologist) counts as 1 character instead of 4