* 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
- Add monospace_attrs() function in main.rs to centralize monospace font attributes creation
- Replace duplicated Attrs::new().family(Family::Monospace) calls in:
* line_number.rs: LineNumberCache::get() method
* main.rs: App::init() font enumeration
* tab.rs: EditorTab::new() constructor
- Remove unused imports (Attrs, Family) from line_number.rs
- Resolves TODO comments about code repetition across modules
This change improves maintainability by having a single source of truth
for monospace font configuration.