dev: drop if_chain and collapse if statements (#2097)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run

This commit is contained in:
QuadnucYard 2025-09-01 16:46:54 +08:00 committed by GitHub
parent 1c9db1ce69
commit ce447185d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 520 additions and 545 deletions

View file

@ -653,10 +653,10 @@ impl SharedContext {
// e.g. `f(x|)`, we will select the `x`
if cursor == node.offset() + 1 && is_mark(node.kind()) {
let prev_leaf = node.prev_leaf();
if let Some(prev_leaf) = prev_leaf {
if prev_leaf.range().end == node.offset() {
node = prev_leaf;
}
if let Some(prev_leaf) = prev_leaf
&& prev_leaf.range().end == node.offset()
{
node = prev_leaf;
}
}