rust-analyzer/crates/ide
bors a150d422cf Auto merge of #17426 - roife:fix-issue-17420, r=Veykril
fix: handle character boundaries for wide chars in extend_selection

fix #17420.

When calling 'extend_selection' within a string, r-a attempts to locate the current word at the cursor. This is done by finding the first char before the cursor which is not a letter, digit, or underscore.

The position of this character is referred to as `start_idx`, and the word is considered to start from `start_idx + 1`. However, for wide characters, `start_idx + 1` is not character boundaries, which leading to panic. We should use `ceil_char_boundary` to ensure that the idx is always on character boundaries.
2024-06-19 08:13:18 +00:00
..
src Auto merge of #17426 - roife:fix-issue-17420, r=Veykril 2024-06-19 08:13:18 +00:00
Cargo.toml Move Edition into span crate 2024-03-21 10:21:44 +01:00